aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2005-01-12 19:17:34 +0000
committerBill Nottingham <notting@redhat.com>2005-01-12 19:17:34 +0000
commit53fa2fa2eae40dabf50fc116033e401fcf04b363 (patch)
tree064d64adf292fbd64e855e1137fe3ea39feaf0a9
parent401814695f8087b9d89f15a52658b7292a0ca663 (diff)
downloadinitscripts-53fa2fa2eae40dabf50fc116033e401fcf04b363.tar
initscripts-53fa2fa2eae40dabf50fc116033e401fcf04b363.tar.gz
initscripts-53fa2fa2eae40dabf50fc116033e401fcf04b363.tar.bz2
initscripts-53fa2fa2eae40dabf50fc116033e401fcf04b363.tar.xz
initscripts-53fa2fa2eae40dabf50fc116033e401fcf04b363.zip
support releasing the dhcp release (<jvdias@redhat.com>)
-rwxr-xr-xsysconfig/network-scripts/ifdown6
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=$?