aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifdown
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2005-01-07 21:16:13 +0000
committerBill Nottingham <notting@redhat.com>2005-01-07 21:16:13 +0000
commitcd46c6ddd9823d553ad5b6de5d5287f052b67d91 (patch)
treefe8d61c01c0128bb94d486302f63f124abb7de45 /sysconfig/network-scripts/ifdown
parentd88bd50ba3874fc9d78d8ef12e5bab8d40927c70 (diff)
downloadinitscripts-cd46c6ddd9823d553ad5b6de5d5287f052b67d91.tar
initscripts-cd46c6ddd9823d553ad5b6de5d5287f052b67d91.tar.gz
initscripts-cd46c6ddd9823d553ad5b6de5d5287f052b67d91.tar.bz2
initscripts-cd46c6ddd9823d553ad5b6de5d5287f052b67d91.tar.xz
initscripts-cd46c6ddd9823d553ad5b6de5d5287f052b67d91.zip
release lease on shutdown, clean up dhclient pid file (modified from <jvdias@redhat.com>)
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 16954b4d..4d0cfd7f 100755
--- a/sysconfig/network-scripts/ifdown
+++ b/sysconfig/network-scripts/ifdown
@@ -83,7 +83,9 @@ retcode=0
if [ "$BOOTPROTO" = bootp -o "$BOOTPROTO" = dhcp ]; then
[ -n "`pidof -x dhclient`" ] && {
if [ -f "/var/run/dhclient-${DEVICE}.pid" ]; then
+ /sbin/dhclient -r -lf /var/lib/dhcp/dhclient-${DEVICE}.leases -pf /var/run/dhclient-${DEVICE}.pid ${DEVICE} >/dev/null 2>&1
kill `cat /var/run/dhclient-${DEVICE}.pid` >/dev/null 2>&1
+ rm -f /var/run/dhclient-${DEVICE}.pid
retcode=$?
fi
}