Package: ifupdown
Version: 0.6.4-4.12
Severity: normal
Tags: patch

Patch is attached.

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing'), (50, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.11
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)

Versions of packages ifupdown depends on:
ii  debconf [debconf-2.0]       1.4.32       Debian configuration management sy
ii  libc6                       2.3.2.ds1-20 GNU C Library: Shared libraries an
ii  net-tools                   1.60-10      The NET-3 networking toolkit

-- debconf information:
  ifupdown/convert-interfaces: false
diff -Naur ifupdown-0.6.4-4.11/debian/changelog 
ifupdown-0.6.4-4.12a1/debian/changelog
--- ifupdown-0.6.4-4.11/debian/changelog        2005-04-03 10:21:07.000000000 
+0200
+++ ifupdown-0.6.4-4.12a1/debian/changelog      2005-04-03 10:29:58.000000000 
+0200
@@ -1,9 +1,32 @@
+ifupdown (0.6.4-4.12a1) unstable; urgency=low
+
+  * Depend on initscripts (>= 2.85-15) | coreutils (>= 5.3.0) in order
+    to get a readlink program that implements the -f option the way we
+    need  (Closes: #302519)
+  * Add bash shebang to mkenwdep.sh (closes: #294970) and remove some
+    XSIisms
+
+ -- Thomas Hood <[EMAIL PROTECTED]>  Fri,  1 Apr 2005 16:26:13 +0200
+
+ifupdown (0.6.4-4.12) unstable; urgency=low
+
+  * Non-maintainer upload
+  * Begin description synopsis with lower case letter
+  * postinst:
+    + Create run dir at the target of /etc/network/run if it is absent
+      (Closes: #297898)
+
+ -- Thomas Hood <[EMAIL PROTECTED]>  Thu,  3 Mar 2005 19:05:05 +0100
+
 ifupdown (0.6.4-4.11) unstable; urgency=low
 
   * Non-maintainer upload
-  * Do not make /etc/network/run a symlink to /dev/shm/network/
-    if devfs is in use.  (Closes: #266479)
-  * Fix initscript output
+  * postinst:
+    + Do not make /etc/network/run a symlink to /dev/shm/network/
+      if devfs is in use.  (Closes: #266479)
+  * /etc/init.d/ifupdown:
+    + Don't accept arguments to "start" method
+    + Fix initscript output
   * ifup.8:
     + Correct typo (Closes: #287172)
   * interfaces.5:
diff -Naur ifupdown-0.6.4-4.11/debian/control 
ifupdown-0.6.4-4.12a1/debian/control
--- ifupdown-0.6.4-4.11/debian/control  2005-04-03 10:21:07.000000000 +0200
+++ ifupdown-0.6.4-4.12a1/debian/control        2005-04-03 10:29:58.000000000 
+0200
@@ -7,11 +7,11 @@
 
 Package: ifupdown
 Architecture: any
-Depends: net-tools, ${shlibs:Depends}, ${misc:Depends}, ${debconf-depends}
+Depends: initscripts (>= 2.85-15) | coreutils (>= 5.3.0), net-tools, 
${shlibs:Depends}, ${misc:Depends}, ${debconf-depends}
 Suggests: iproute, dhcp3-client | dhcp-client, ppp
 Replaces: netbase (<< 4.00)
 Conflicts: dhcp-client (= 3.0.1betaRC4-1)
-Description: High level tools to configure network interfaces
+Description: high level tools to configure network interfaces
  This package provides the tools ifup and ifdown which may be used to
  configure (or, respectively, deconfigure) network interfaces based on
  interface definitions in the file /etc/network/interfaces.
diff -Naur ifupdown-0.6.4-4.11/debian/ifupdown.init 
ifupdown-0.6.4-4.12a1/debian/ifupdown.init
--- ifupdown-0.6.4-4.11/debian/ifupdown.init    2005-04-03 10:21:07.000000000 
+0200
+++ ifupdown-0.6.4-4.12a1/debian/ifupdown.init  2005-04-03 10:29:58.000000000 
+0200
@@ -17,6 +17,10 @@
 
 case "$1" in
        start|restart)
+               if [ "$2" ]; then
+                       report_err "Arguments to '$1' command not accepted"
+                       exit 3
+               fi
                echo -n "Setting up networking..."
                #
                # /etc/network/run can be either a directory or a symlink
@@ -55,6 +59,10 @@
                exit 0
                ;;
        stop)
+               if [ "$2" ]; then
+                       report_err "Arguments to '$1' command not accepted"
+                       exit 3
+               fi
                [ -x /etc/init.d/ifupdown-clean ] && /etc/init.d/ifupdown-clean 
start
                ;;
        force-reload)
diff -Naur ifupdown-0.6.4-4.11/debian/postinst 
ifupdown-0.6.4-4.12a1/debian/postinst
--- ifupdown-0.6.4-4.11/debian/postinst 2005-04-03 10:21:07.000000000 +0200
+++ ifupdown-0.6.4-4.12a1/debian/postinst       2005-04-03 10:29:58.000000000 
+0200
@@ -2,11 +2,14 @@
 set -e
 
 MYNAME="${0##*/}"
-report_warn()
-{
-       echo "$MYNAME: Warning: $*" >&2
-}
 
+# Once the improved readlink program has made it into coreutils,
+# /lib/init/ can be removed from the PATH.
+PATH=/lib/init:/sbin:/bin:/usr/sbin:/usr/bin
+
+report() { echo "${MYNAME}: $*" ; }
+report_warn() { report "Warning: $*" >&2 ; }
+report_err() { report "Error: $*" >&2 ; }
 
 if [ "$1" = "configure" ] && [ -e /usr/share/debconf/confmodule ] ; then
     . /usr/share/debconf/confmodule
@@ -65,24 +68,39 @@
 
 if [ "$1" = configure ] ; then
 
-# Set up run dir if it does not exist
-  if [ ! -e /etc/network/run ] && [ ! -L /etc/network/run ]; then
-      # Use /dev/shm if possible
-      if \
-        [ -d /dev/shm ] \
-        && [ -w /dev/shm ] \
-        && [ -r /proc/mounts ] \
-        && grep -qs 
"^tmpfs[[:space:]]\+/dev/shm[[:space:]]\+tmpfs[[:space:]]\+\([^[:space:]]\+,\)\?rw"
 /proc/mounts \
-        && ! grep -qs '[[:space:]]/dev[[:space:]]devfs[[:space:]]' 
/proc/mounts \
-        && { [ -d /dev/shm/network ] || mkdir -v /dev/shm/network ; }
-      then
-        ln -s /dev/shm/network /etc/network/run
-      else
-        mkdir -v /etc/network/run
-      fi
+  # Set up run dir if required
+  if [ ! -d /etc/network/run ] && [ ! -L /etc/network/run ]; then
+       [ -e /etc/network/run ] && rm -f /etc/network/run
+       # Use /dev/shm if possible
+       if \
+               [ -d /dev/shm ] \
+               && [ -w /dev/shm ] \
+               && [ -r /proc/mounts ] \
+               && grep -qs 
"^tmpfs[[:space:]]\+/dev/shm[[:space:]]\+tmpfs[[:space:]]\+\([^[:space:]]\+,\)\?rw"
 /proc/mounts \
+               && ! grep -qs '[[:space:]]/dev[[:space:]]devfs[[:space:]]' 
/proc/mounts \
+               && { [ -d /dev/shm/network ] || mkdir -v /dev/shm/network ; }
+       then
+               ln -s /dev/shm/network /etc/network/run
+       else
+               mkdir -v /etc/network/run
+       fi
+  fi
+
+  # Create run dir if required
+  if [ -L /etc/network/run ] && [ ! -d /etc/network/run ] ; then
+       # Create directory at the target
+       if RUN_CANONICALDIR="$(readlink -f /etc/network/run)" && [ 
"$RUN_CANONICALDIR" ] ; then
+               if ! mkdir "$RUN_CANONICALDIR" ; then
+                       report_err "Failure creating directory 
${RUN_CANONICALDIR}. Aborting."
+                       exit 1
+               fi
+       else
+               report_err "The canonical path of /etc/network/run could not be 
determined. Aborting."
+               exit 1
+       fi
   fi
 
-# Set up ifstate file if it does not exist
+  # Set up ifstate file if it does not exist
   if [ ! -e /etc/network/ifstate ] ; then
       if [ ! -L /etc/network/ifstate ] && [ -d /etc/network/run ] ; then
            ln -s run/ifstate /etc/network/ifstate
diff -Naur ifupdown-0.6.4-4.11/makecdep.sh ifupdown-0.6.4-4.12a1/makecdep.sh
--- ifupdown-0.6.4-4.11/makecdep.sh     2000-11-18 08:12:02.000000000 +0100
+++ ifupdown-0.6.4-4.12a1/makecdep.sh   2005-04-03 10:29:58.000000000 +0200
@@ -1,6 +1,6 @@
-#!/bin/sh
+#!/bin/bash
 FILE=$1
-if [ "$FILE" = "" -o ! -f "$FILE" ]; then
+if [ "$FILE" = "" ] || [ ! -f "$FILE" ]; then
         echo "Please specify a .c file"
         exit 1
 fi
diff -Naur ifupdown-0.6.4-4.11/makenwdep.sh ifupdown-0.6.4-4.12a1/makenwdep.sh
--- ifupdown-0.6.4-4.11/makenwdep.sh    2000-11-18 08:12:01.000000000 +0100
+++ ifupdown-0.6.4-4.12a1/makenwdep.sh  2005-04-03 10:29:58.000000000 +0200
@@ -1,6 +1,9 @@
+#!/bin/bash
+# Require bash because we use echo -e
+
 FILE=$1
 
-if [ "$FILE" = "" -o ! -f "$FILE" ]; then
+if [ "$FILE" = "" ] || [ ! -f "$FILE" ]; then
         echo "Please specify a .nw file"
         exit 1
 fi

Reply via email to