File ifplugd.dif of Package ifplugd

diff -ru ifplugd-0.25-clean/conf/ifplugd.conf ifplugd-0.25/conf/ifplugd.conf
--- ifplugd-0.25-clean/conf/ifplugd.conf	2003-12-11 18:58:43.000000000 +0100
+++ ifplugd-0.25/conf/ifplugd.conf	2004-08-06 12:15:44.153728238 +0200
@@ -34,9 +34,10 @@
 
 # Additional parameters for ifplugd.
 # (Run "ifplugd -h" for further information.)
-ARGS="-fwI -u0 -d10"
+# Note: -w breaks the reporting of the initscript.
+ARGS="-afI -u0 -d10"
 
 # Additional parameters for ifplugd for the specified interface.  Note
 # that $ARGS is ignored, when a variable like this is set for an
 # interface
-#ARGS_wlan0="-MwI -u5 -d5"
+#ARGS_wlan0="-MI -u5 -d5"
diff -ru ifplugd-0.25-clean/conf/ifplugd.init.in ifplugd-0.25/conf/ifplugd.init.in
--- ifplugd-0.25-clean/conf/ifplugd.init.in	2004-01-26 16:34:24.000000000 +0100
+++ ifplugd-0.25/conf/ifplugd.init.in	2004-08-06 12:15:44.152728389 +0200
@@ -49,36 +49,51 @@
 fi
 
 [ -f $CFG ] && . $CFG
+. /etc/rc.status
 
 VERB="$1"
 shift
 
 [ "x$*" != "x" ] && INTERFACES="$*"
 
-[ "x$INTERFACES" = "xauto" ] && INTERFACES="`cat /proc/net/dev | awk '{ print $1 }' | egrep '^(eth|wlan)' | cut -d: -f1`"
+[ "x$INTERFACES" = "xauto" ] && INTERFACES="`awk -F':' '/^\s*(eth|wlan|ath)/ {print $1}' /proc/net/dev`"
 
+rc_reset
 case "$VERB" in
     start)
-        echo -n "Starting Network Interface Plugging Daemon:"
+        echo "Starting Network Interface Plugging Daemon:"
         for IF in $INTERFACES ; do
-            A="`eval echo \$\{ARGS_${IF}\}`"
-            [ -z "$A" ] && A="$ARGS"
-            $IFPLUGD -i $IF $A
-            echo -n " $IF"
+            REALIF=`getcfg-interface $IF`
+            if [ -z "$REALIF" ]; then
+                echo " could not get physical interface for $IF."
+            else
+                A="`eval echo \$\{ARGS_${IF}\}`"
+                [ -z "$A" ] && A="$ARGS"
+                echo -n "  $IF"
+                $IFPLUGD -i $REALIF $A
+                rc_status -v
+            fi
         done
-        echo "."
         ;;
     stop)
         echo -n "Stopping Network Interface Plugging Daemon:"
         for IF in $INTERFACES ; do 
-            $IFPLUGD -k -i $IF
-            echo -n " $IF"
+            REALIF=`getcfg-interface $IF`
+            if [ -z "$REALIF" ]; then
+                echo " could not get physical interface for $IF."
+            else
+                $IFPLUGD -k -i $REALIF
+                echo -n " $IF"
+            fi
         done
         echo "."
         ;;
     status)
+        echo "Checking Network Interface Plugging Daemon:"
         for IF in $INTERFACES ; do
-            $IFPLUGD -c -i $IF
+            echo -n "  $IF"
+            $IFPLUGD -c -i $IF &> /dev/null || rc_failed 3
+            rc_status -v
         done
         ;;
     suspend)
@@ -107,4 +122,4 @@
         exit 1
 esac
 
-exit 0
+rc_exit
diff -ru ifplugd-0.25-clean/doc/README.SuSE ifplugd-0.25/doc/README.SuSE
--- ifplugd-0.25-clean/doc/README.SuSE	2004-01-26 16:34:24.000000000 +0100
+++ ifplugd-0.25/doc/README.SuSE	2004-08-06 12:10:26.623878000 +0200
@@ -12,4 +12,18 @@
 
 	STARTMODE='manual'
 
+Note that you may (and should) use the new interface configuration names
+e.g. if you have the file
+
+        /etc/sysconfig/network/ifcfg-eth-id-08:00:46:d2:3c:99
+
+describing your ethernet interface, you should use
+
+        INTERFACES='eth-id-08:00:46:d2:3c:99'
+
+the start script will find the related interface (e.g. eth0 or eth1) and
+use this for ifplugd. This method is the preferred configuration since
+it avoids confusion when interface names change due to added network cards
+or changed kernel configurations.
+
 $Id: README.SuSE 86 2004-01-26 15:34:24Z lennart $