aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifdown
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2005-01-13 18:50:55 +0000
committerBill Nottingham <notting@redhat.com>2005-01-13 18:50:55 +0000
commit6e269c2fc56a67019ec3ae7f16d5f0c6b02bd98e (patch)
tree37c84ec024d603cdf8b4a076ed6a80acb0f732f9 /sysconfig/network-scripts/ifdown
parente357600925dacdff4ce854204bc55deed0df6690 (diff)
downloadinitscripts-6e269c2fc56a67019ec3ae7f16d5f0c6b02bd98e.tar
initscripts-6e269c2fc56a67019ec3ae7f16d5f0c6b02bd98e.tar.gz
initscripts-6e269c2fc56a67019ec3ae7f16d5f0c6b02bd98e.tar.bz2
initscripts-6e269c2fc56a67019ec3ae7f16d5f0c6b02bd98e.tar.xz
initscripts-6e269c2fc56a67019ec3ae7f16d5f0c6b02bd98e.zip
don't flush addresses for dhcp - preserve old behavior
Diffstat (limited to 'sysconfig/network-scripts/ifdown')
-rwxr-xr-xsysconfig/network-scripts/ifdown2
1 files changed, 2 insertions, 0 deletions
diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown
index 93d41576..d4a35086 100755
--- a/sysconfig/network-scripts/ifdown
+++ b/sysconfig/network-scripts/ifdown
@@ -105,6 +105,7 @@ retcode=0
pump -r -i ${DEVICE}
retcode=$?
}
+if ! [ "$BOOTPROTO" = bootp -o "$BOOTPROTO" = dhcp ]; then
# we can't just delete the configured address because that address
# may have been changed in the config file since the device was
# brought up. Flush all addresses associated with this
@@ -114,6 +115,7 @@ retcode=0
else
ip addr flush dev ${REALDEVICE} label ${DEVICE} 2>/dev/null
fi
+fi
if [ "${REALDEVICE}" = "${DEVICE}" ]; then
ip link set dev ${DEVICE} down