aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifdown-eth
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2010-01-08 17:12:09 -0500
committerBill Nottingham <notting@redhat.com>2010-01-08 17:12:09 -0500
commit36697b32a0ea243447430d8c72ebfd55bc2736c2 (patch)
tree44e6bfcbf8506c3fce6bdf697c899ea2cd337ba9 /sysconfig/network-scripts/ifdown-eth
parent4bc057e8701b8619557640903fd228bef1e8736f (diff)
downloadinitscripts-36697b32a0ea243447430d8c72ebfd55bc2736c2.tar
initscripts-36697b32a0ea243447430d8c72ebfd55bc2736c2.tar.gz
initscripts-36697b32a0ea243447430d8c72ebfd55bc2736c2.tar.bz2
initscripts-36697b32a0ea243447430d8c72ebfd55bc2736c2.tar.xz
initscripts-36697b32a0ea243447430d8c72ebfd55bc2736c2.zip
Run '/sbin/dhclient -6' instead of /sbin/dhcp6c (#553017, <dcantrell@redhat.com>)
The ISC software is now used for DHCPv6 support, so run dhclient in DHCPv6 mode instead of the older /sbin/dhcp6c program. Still honor the same configuration variables.
Diffstat (limited to 'sysconfig/network-scripts/ifdown-eth')
-rwxr-xr-xsysconfig/network-scripts/ifdown-eth18
1 files changed, 8 insertions, 10 deletions
diff --git a/sysconfig/network-scripts/ifdown-eth b/sysconfig/network-scripts/ifdown-eth
index 5e6d7d35..1ca6a6f2 100755
--- a/sysconfig/network-scripts/ifdown-eth
+++ b/sysconfig/network-scripts/ifdown-eth
@@ -63,28 +63,26 @@ if is_bonding_device ${DEVICE} ; then
fi
/etc/sysconfig/network-scripts/ifdown-ipv6 ${CONFIG}
-if [[ "${DHCPV6C}" = [Yy1]* ]] && [ -f /var/run/dhcp6c_${DEVICE}.pid ]; then
- kill $(cat /var/run/dhcp6c_${DEVICE}.pid);
- rm -f /var/run/dhcp6c_${DEVICE}.pid;
-fi
retcode=0
[ -n "$(pidof -x dhclient)" ] && {
- if [ -f "/var/run/dhclient-${DEVICE}.pid" ]; then
- dhcpid=$(cat /var/run/dhclient-${DEVICE}.pid)
+ for VER in "" 6 ; do
+ if [ -f "/var/run/dhclient$VER-${DEVICE}.pid" ]; then
+ dhcpid=$(cat /var/run/dhclient$VER-${DEVICE}.pid)
if [[ "$DHCPRELEASE" = [yY1]* ]]; then
- /sbin/dhclient -r -lf /var/lib/dhclient/dhclient-${DEVICE}.leases -pf /var/run/dhclient-${DEVICE}.pid ${DEVICE} >/dev/null 2>&1
+ /sbin/dhclient -r -lf /var/lib/dhclient/dhclient$VER-${DEVICE}.leases -pf /var/run/dhclient-${DEVICE}.pid ${DEVICE} >/dev/null 2>&1
retcode=$?
else
kill $dhcpid >/dev/null 2>&1
retcode=$?
- reason=STOP interface=${DEVICE} /sbin/dhclient-script
+ reason=STOP$VER interface=${DEVICE} /sbin/dhclient-script
fi
- if [ -f "/var/run/dhclient-${DEVICE}.pid" ]; then
- rm -f /var/run/dhclient-${DEVICE}.pid
+ if [ -f "/var/run/dhclient$VER-${DEVICE}.pid" ]; then
+ rm -f /var/run/dhclient$VER-${DEVICE}.pid
kill $dhcpid >/dev/null 2>&1
fi
fi
+ done
}
# we can't just delete the configured address because that address
# may have been changed in the config file since the device was