aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2001-07-17 23:04:05 +0000
committerBill Nottingham <notting@redhat.com>2001-07-17 23:04:05 +0000
commitca551e2debb9a703f23a9811da6baa919f330e5f (patch)
treea7e1e6b5df60b3ff7993b44d6e4ff8b992ffbbda /sysconfig/network-scripts
parent300c7e62701232894f97e2d7a8ae9fd32d778e7b (diff)
downloadinitscripts-ca551e2debb9a703f23a9811da6baa919f330e5f.tar
initscripts-ca551e2debb9a703f23a9811da6baa919f330e5f.tar.gz
initscripts-ca551e2debb9a703f23a9811da6baa919f330e5f.tar.bz2
initscripts-ca551e2debb9a703f23a9811da6baa919f330e5f.tar.xz
initscripts-ca551e2debb9a703f23a9811da6baa919f330e5f.zip
only remove the IP address for the !DHCP case
Diffstat (limited to 'sysconfig/network-scripts')
-rwxr-xr-xsysconfig/network-scripts/ifdown3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown
index 71ce0ccb..a1a7c27a 100755
--- a/sysconfig/network-scripts/ifdown
+++ b/sysconfig/network-scripts/ifdown
@@ -62,9 +62,10 @@ if [ "$BOOTPROTO" = bootp -o "$BOOTPROTO" = dhcp ]; then
pump -r -i ${DEVICE}
retcode=$?
}
+else
+ ip addr del ${IPADDR}/${PREFIX} brd ${BROADCAST:-+} dev ${DEVICE}
fi
-ip addr del ${IPADDR}/${PREFIX} brd ${BROADCAST:-+} dev ${DEVICE}
ip link set ${DEVICE} down
[ "$retcode" = "0" ] && retcode=$?