aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifdown-eth
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2005-03-03 21:09:18 +0000
committerBill Nottingham <notting@redhat.com>2005-03-03 21:09:18 +0000
commit178740d76e846a66e044dc270e881bd774b38fd2 (patch)
treea4c780fd5c54aeb3ddffdbd01a0ef27dde0be1de /sysconfig/network-scripts/ifdown-eth
parente2d4fb9de77b0e2f2dab503b58491ffb2fd04c36 (diff)
downloadinitscripts-178740d76e846a66e044dc270e881bd774b38fd2.tar
initscripts-178740d76e846a66e044dc270e881bd774b38fd2.tar.gz
initscripts-178740d76e846a66e044dc270e881bd774b38fd2.tar.bz2
initscripts-178740d76e846a66e044dc270e881bd774b38fd2.tar.xz
initscripts-178740d76e846a66e044dc270e881bd774b38fd2.zip
woops
Diffstat (limited to 'sysconfig/network-scripts/ifdown-eth')
-rwxr-xr-xsysconfig/network-scripts/ifdown-eth11
1 files changed, 9 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth
index 83aa7c7a..a9570c01 100755
--- a/sysconfig/network-scripts/ifdown-eth
+++ b/sysconfig/network-scripts/ifdown-eth
@@ -58,12 +58,19 @@ fi;
retcode=0
[ -n "`pidof -x dhclient`" ] && {
if [ -f "/var/run/dhclient-${DEVICE}.pid" ]; then
+ dhcpid=`cat /var/run/dhclient-${DEVICE}.pid`
if [[ "$DHCPRELEASE" = [yY1]* ]]; then
- release_dhcp_lease
+ /sbin/dhclient -r -lf /var/lib/dhcp/dhclient-${DEVICE}.leases -pf /var/run/dhclient-${DEVICE}.pid ${DEVICE} >/dev/null 2>&1
retcode=$?
else
- kill_dhcp_client
+ kill $dhcpid >/dev/null 2>&1
+ retcode=$?
+ reason=STOP interface=${DEVICE} /sbin/dhclient-script
fi
+ if [ -f "/var/run/dhclient-${DEVICE}.pid" ]; then
+ rm -f /var/run/dhclient-${DEVICE}.pid
+ kill $dhcpid >/dev/null 2>&1
+ fi
fi
}
# we can't just delete the configured address because that address