aboutsummaryrefslogtreecommitdiffstats
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:18:36 -0500
commitf62244b39af4360bbf701634014f124654aedc6d (patch)
tree8623fb26c56dadac4d2db0bffe961027bae5909f
parentbd0bb1a92c749739696f5ad14fc68d1baf305ce0 (diff)
downloadinitscripts-f62244b39af4360bbf701634014f124654aedc6d.tar
initscripts-f62244b39af4360bbf701634014f124654aedc6d.tar.gz
initscripts-f62244b39af4360bbf701634014f124654aedc6d.tar.bz2
initscripts-f62244b39af4360bbf701634014f124654aedc6d.tar.xz
initscripts-f62244b39af4360bbf701634014f124654aedc6d.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.
-rw-r--r--sysconfig.txt6
-rwxr-xr-xsysconfig/network-scripts/ifdown-eth18
-rwxr-xr-xsysconfig/network-scripts/ifup-eth6
3 files changed, 13 insertions, 17 deletions
diff --git a/sysconfig.txt b/sysconfig.txt
index 3be175fb..2dce8e81 100644
--- a/sysconfig.txt
+++ b/sysconfig.txt
@@ -665,11 +665,11 @@ Files in /etc/sysconfig/network-scripts/
IPv6-only option to enable DHCPv6 client:
DHCPV6C=yes|no
- This will enable the DHCPv6 client, dhcp6c, to be run for the interface.
- See man dhcp6c(8) and dhcp6c.conf(5).
+ This will enable the DHCPv6 features of dhclient to be run for the interface.
+ See man dhclient(8) and dhclient.conf(5).
DHCPV6C_OPTIONS=...
This will pass given arguments to the DHCPv6 client. For example,
- "-I" option will request network information (e.g., DNS addresses)
+ "-S" option will request network information (e.g., DNS addresses)
only, not IPv6 addresses.
Ethernet-only items:
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
diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth
index 1fa871db..d3bb25b6 100755
--- a/sysconfig/network-scripts/ifup-eth
+++ b/sysconfig/network-scripts/ifup-eth
@@ -305,10 +305,8 @@ fi
# IPv6 initialisation?
/etc/sysconfig/network-scripts/ifup-ipv6 ${CONFIG}
-if [[ "${DHCPV6C}" = [Yy1]* ]] && [ -x /sbin/dhcp6c ]; then
- /sbin/dhcp6c ${DHCPV6C_OPTIONS} ${DEVICE}
- dhcp6_pid=($(/bin/ps -eo 'pid,args' | /bin/grep "dhcp6c ${DHCPV6C_OPTIONS} ${DEVICE}" | egrep -v grep))
- [ -n "$dhcp6_pid" ] && echo ${dhcp6_pid[0]} > /var/run/dhcp6c_${DEVICE}.pid
+if [[ "${DHCPV6C}" = [Yy1]* ]] && [ -x /sbin/dhclient ]; then
+ /sbin/dhclient -6 ${DHCPV6C_OPTIONS} ${DEVICE} -lf /var/lib/dhclient/dhclient6-${DEVICE}.leases -pf /var/run/dhclient6-${DEVICE}.pid
fi
exec /etc/sysconfig/network-scripts/ifup-post ${CONFIG} ${2}