diff options
author | Bill Nottingham <notting@redhat.com> | 2005-01-07 22:05:33 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2005-01-07 22:05:33 +0000 |
commit | 401814695f8087b9d89f15a52658b7292a0ca663 (patch) | |
tree | 71f82241ae78561dae899729948105f9899e7b7f /sysconfig | |
parent | cb7a35971277694140bfcdaf45dac5b47b0c5535 (diff) | |
download | initscripts-401814695f8087b9d89f15a52658b7292a0ca663.tar initscripts-401814695f8087b9d89f15a52658b7292a0ca663.tar.gz initscripts-401814695f8087b9d89f15a52658b7292a0ca663.tar.bz2 initscripts-401814695f8087b9d89f15a52658b7292a0ca663.tar.xz initscripts-401814695f8087b9d89f15a52658b7292a0ca663.zip |
release lease on shutdown, clean up dhclient pid file (modified from <jvdias@redhat.com>)
Diffstat (limited to 'sysconfig')
-rwxr-xr-x | sysconfig/network-scripts/ifdown | 2 |
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 } |