diff options
author | Bill Nottingham <notting@redhat.com> | 2005-01-12 19:16:59 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2005-01-12 19:16:59 +0000 |
commit | 47c2a2377d2b20aee62ca46d44172324dff02da3 (patch) | |
tree | cb61012e45826d402114290b1260160441714377 /sysconfig/network-scripts/ifdown | |
parent | e471b451ca68a21441da3eea35919b4b7c627b6e (diff) | |
download | initscripts-47c2a2377d2b20aee62ca46d44172324dff02da3.tar initscripts-47c2a2377d2b20aee62ca46d44172324dff02da3.tar.gz initscripts-47c2a2377d2b20aee62ca46d44172324dff02da3.tar.bz2 initscripts-47c2a2377d2b20aee62ca46d44172324dff02da3.tar.xz initscripts-47c2a2377d2b20aee62ca46d44172324dff02da3.zip |
support releasing the DHCP lease
Diffstat (limited to 'sysconfig/network-scripts/ifdown')
-rwxr-xr-x | sysconfig/network-scripts/ifdown | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sysconfig/network-scripts/ifdown b/sysconfig/network-scripts/ifdown index 4d0cfd7f..3c64bf27 100755 --- a/sysconfig/network-scripts/ifdown +++ b/sysconfig/network-scripts/ifdown @@ -83,7 +83,11 @@ 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 + 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=$? |