aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifdown
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2005-01-12 21:29:47 +0000
committerBill Nottingham <notting@redhat.com>2005-01-12 21:29:47 +0000
commit63d24c77184d8afa1f41c193d15a1ca06226fbb2 (patch)
tree3754c3659bb7f2105e487b1541bcfcb3e21ae58f /sysconfig/network-scripts/ifdown
parent25f7d7fc6ae84bc15b47ae51d97aea5b99ad995f (diff)
downloadinitscripts-63d24c77184d8afa1f41c193d15a1ca06226fbb2.tar
initscripts-63d24c77184d8afa1f41c193d15a1ca06226fbb2.tar.gz
initscripts-63d24c77184d8afa1f41c193d15a1ca06226fbb2.tar.bz2
initscripts-63d24c77184d8afa1f41c193d15a1ca06226fbb2.tar.xz
initscripts-63d24c77184d8afa1f41c193d15a1ca06226fbb2.zip
remove pump, dhcpcd support.
Diffstat (limited to 'sysconfig/network-scripts/ifdown')
-rwxr-xr-xsysconfig/network-scripts/ifdown47
1 files changed, 17 insertions, 30 deletions
diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown
index 88c9a9cf..154974e6 100755
--- a/sysconfig/network-scripts/ifdown
+++ b/sysconfig/network-scripts/ifdown
@@ -80,40 +80,27 @@ if [ "${NETWORKING_IPV6}" = "yes" ]; then
fi;
retcode=0
- [ -n "`pidof -x dhclient`" ] && {
- if [ -f "/var/run/dhclient-${DEVICE}.pid" ]; then
- if [[ "$DHCPRELEASE" = [yY1]* ]]; then
- /sbin/dhclient -r -lf /var/lib/dhcp/dhclient-${DEVICE}.leases -pf /var/run/dhclient-${DEVICE}.pid ${DEVICE} >/dev/null 2>&1
- else
+[ -n "`pidof -x dhclient`" ] && {
+ if [ -f "/var/run/dhclient-${DEVICE}.pid" ]; then
+ if [[ "$DHCPRELEASE" = [yY1]* ]]; then
+ /sbin/dhclient -r -lf /var/lib/dhcp/dhclient-${DEVICE}.leases -pf /var/run/dhclient-${DEVICE}.pid ${DEVICE} >/dev/null 2>&1
+ else
reason=STOP interface=${DEVICE} /sbin/dhclient-script
- fi
- kill `cat /var/run/dhclient-${DEVICE}.pid` >/dev/null 2>&1
- rm -f /var/run/dhclient-${DEVICE}.pid
- retcode=$?
fi
- }
- [ -n "`pidof -x dhcpcd`" ] && {
- if [ -f "/etc/dhcpc/dhcpcd-${DEVICE}.pid" ]; then
- kill `cat /etc/dhcpc/dhcpcd-${DEVICE}.pid` >/dev/null 2>&1
- retcode=$?
- elif [ -f "/var/run/dhcpcd-${DEVICE}.pid" ]; then
- kill `cat /var/run/dhcpcd-${DEVICE}.pid` >/dev/null 2>&1
- retcode=$?
- fi
- }
- [ -n "`pidof -x pump`" ] && {
- pump -r -i ${DEVICE}
+ kill `cat /var/run/dhclient-${DEVICE}.pid` >/dev/null 2>&1
+ rm -f /var/run/dhclient-${DEVICE}.pid
retcode=$?
- }
- # 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
- # instance instead.
- if [ "${REALDEVICE}" = "${DEVICE}" ]; then
- ip addr flush dev ${REALDEVICE} 2>/dev/null
- else
- ip addr flush dev ${REALDEVICE} label ${DEVICE} 2>/dev/null
fi
+}
+# 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
+# instance instead.
+if [ "${REALDEVICE}" = "${DEVICE}" ]; then
+ ip addr flush dev ${REALDEVICE} 2>/dev/null
+else
+ ip addr flush dev ${REALDEVICE} label ${DEVICE} 2>/dev/null
+fi
if [ "${REALDEVICE}" = "${DEVICE}" ]; then
ip link set dev ${DEVICE} down