integ/base/initscripts/centos/patches/run-dhclient-as-daemon-for-...

35 lines
1.4 KiB
Diff

From 580624314b1b93f84264e9d60583dcde4f6b86f3 Mon Sep 17 00:00:00 2001
From: Joseph Richard <Joseph.Richard@windriver.com>
Date: Thu, 11 Jan 2018 11:18:19 -0500
Subject: [PATCH] run dhclient as daemon for ipv6.
---
sysconfig/network-scripts/ifup-eth | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth
index 4b8b992..ccb5c75 100755
--- a/sysconfig/network-scripts/ifup-eth
+++ b/sysconfig/network-scripts/ifup-eth
@@ -363,13 +363,14 @@ if is_true "${DHCPV6C}" && [ -x /sbin/dhclient ]; then
echo -n $"Determining IPv6 information for ${DEVICE}..."
# Initialize the dhclient args for IPv6 and obtain the hostname options if needed:
- DHCLIENTARGS="-6 -1 ${DHCPV6C_OPTIONS} ${DHCLIENTCONF} -lf ${LEASEFILE} --restrict-interfaces -pf /var/run/dhclient6-${DEVICE}.pid ${DEVICE}"
+ DHCLIENTARGS="-6 ${DHCPV6C_OPTIONS} ${DHCLIENTCONF} -lf ${LEASEFILE} --restrict-interfaces -pf /var/run/dhclient6-${DEVICE}.pid ${DEVICE}"
set_hostname_options DHCLIENTARGS
- if /sbin/dhclient $DHCLIENTARGS; then
+ if /sbin/dhclient -1 $DHCLIENTARGS; then
echo $" done."
else
- echo $" failed."
+ /sbin/dhclient $DHCLIENTARGS&
+ echo $" failed. Retrying in background."
if [ "${dhcpipv4}" = "good" -o -n "${IPADDR}" ]; then
net_log "Unable to obtain IPv6 DHCP address ${DEVICE}." warning
else
--
1.8.3.1