diff options
author | Bill Nottingham <notting@redhat.com> | 2009-05-04 12:00:55 +0200 |
---|---|---|
committer | Harald Hoyer <harald@redhat.com> | 2009-05-04 16:05:04 +0200 |
commit | f67b6ca968ed07aeb7c26b71187b8cfad114e769 (patch) | |
tree | eadc89f373262704ac2726088168583d2d9651c9 | |
parent | 9df63c38122472b8b939587c0b3fcf009cea8d13 (diff) | |
download | initscripts-f67b6ca968ed07aeb7c26b71187b8cfad114e769.tar initscripts-f67b6ca968ed07aeb7c26b71187b8cfad114e769.tar.gz initscripts-f67b6ca968ed07aeb7c26b71187b8cfad114e769.tar.bz2 initscripts-f67b6ca968ed07aeb7c26b71187b8cfad114e769.tar.xz initscripts-f67b6ca968ed07aeb7c26b71187b8cfad114e769.zip |
add proper return codes for /etc/init.d/network (#481002)
-rwxr-xr-x | rc.d/init.d/network | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/rc.d/init.d/network b/rc.d/init.d/network index e209b3a8..015120b7 100755 --- a/rc.d/init.d/network +++ b/rc.d/init.d/network @@ -50,9 +50,11 @@ interfaces=$(ls ifcfg* | \ LANG=C sort -k 1,1 -k 2n | \ LANG=C sed 's/ //') +rc=0 # See how we were called. case "$1" in start) + rc=0 # IPv6 hook (pre IPv4 start) if [ "$NETWORKING_IPV6" = "yes" ]; then if [ -x /etc/sysconfig/network-scripts/init.ipv6-global ]; then @@ -134,6 +136,7 @@ case "$1" in test $? = 1 && continue fi action $"Bringing up interface $i: " ./ifup $i boot + rc=$((rc+$?)) done # Bring up xDSL and CIPE interfaces @@ -145,6 +148,7 @@ case "$1" in test $? = 1 && continue fi action $"Bringing up interface $i: " ./ifup $i boot + rc=$((rc+$?)) fi done @@ -201,6 +205,7 @@ case "$1" in xdslinterfaces="" bridgeinterfaces="" remaining="" + rc=0 # get list of bonding, cipe, and xdsl interfaces for i in $interfaces; do @@ -236,6 +241,7 @@ case "$1" in if ! check_device_down $DEVICE; then action $"Shutting down interface $i: " ./ifdown $i boot + rc=$((rc+$?)) fi ) done @@ -289,4 +295,4 @@ case "$1" in exit 1 esac -exit 0 +exit $rc |