]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
check return value from dhcp shutdown and return it
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Mon, 23 Oct 2000 22:17:57 +0000 (22:17 +0000)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Mon, 23 Oct 2000 22:17:57 +0000 (22:17 +0000)
svn-id: @815

sysconfig/network-scripts/ifdown

index 620cc49e9705d745748fefa3cac7e8858eb34b87..42003e20ff6c3ff4b1c175e730015a9bc860e68a 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#      $Id: ifdown,v 1.24.2.1 2000/10/18 20:10:54 misiek Exp $
+#      $Id: ifdown,v 1.24.2.2 2000/10/23 22:17:57 misiek Exp $
 #
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 
@@ -54,22 +54,27 @@ check_device_down && exit 0
 
 if [ "$BOOTMETHOD" = "bootp" -o "$BOOTMETHOD" = "pump" ]; then
        /sbin/pump -r -i ${DEVICE}
+       RESULT=$?
 fi
 
 if [ "$BOOTMETHOD" = "dhcp" ]; then
     if [ -x /sbin/dhcpcd ];then
         /sbin/dhcpcd -k ${DEVICE}
+       RESULT=$?
     elif [ -x /sbin/dhclient ];then
         if [ -f /var/run/dhclient.pid ];then
             PID=$(cat /var/run/dhclient.pid)
             if ps ax --no-header|grep -q $PID;then
                 kill $PID
+               RESULT=$?
             fi
         fi
     elif [ -x /sbin/dhcpxd ];then
         /sbin/dhcpxd -k ${DEVICE}
+       RESULT=$?
     elif [ -x /sbin/pump ];then
         pump -r -i ${DEVICE}
+       RESULT=$?
     fi
 fi
 
@@ -79,9 +84,12 @@ ip addr flush dev ${DEVICE} 2>&1 | grep -v "Nothing to flush"
 if [ "$HANDLING" -eq 4 ]; then
     exit 0
 fi
-       
-exec /etc/sysconfig/network-scripts/ifdown-post $CONFIG
 
+if [ "$RESULT" -ne "0" ]; then
+       return $RESULT
+fi
+
+exec /etc/sysconfig/network-scripts/ifdown-post $CONFIG
 
 # This must be last line !
 # vi:syntax=sh:tw=78:ts=8:sw=4
This page took 0.177642 seconds and 4 git commands to generate.