From 94c6a8b314c9924956f2c9dd8df5895d5d3c96c3 Mon Sep 17 00:00:00 2001 From: Lukas Nykryn Date: Fri, 12 Apr 2013 12:59:20 +0200 Subject: try dhcpv6 after v4 failed Conflicts: sysconfig/network-scripts/ifup-eth --- sysconfig/network-scripts/ifup-eth | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'sysconfig') diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth index 7210084b..26534cf0 100755 --- a/sysconfig/network-scripts/ifup-eth +++ b/sysconfig/network-scripts/ifup-eth @@ -184,10 +184,17 @@ if [ -n "${DYNCONFIG}" -a -x /sbin/dhclient ]; then ethtool_set if /sbin/dhclient ${DHCLIENTARGS} ${DEVICE} ; then - echo $" done." + echo $" done." + dhcpipv4="good" else - echo $" failed." - exit 1 + echo $" failed." + if [[ "${IPV4_FAILURE_FATAL}" = [Yy1]* ]] ; then + exit 1 + fi + if [[ "$IPV6INIT" != [yY1]* && "$DHCPV6C" != [yY1]* ]] ; then + exit 1 + fi + net_log "Unable to obtain IPv4 DHCP address ${DEVICE}." warning fi # end dynamic device configuration else @@ -281,7 +288,22 @@ fi /etc/sysconfig/network-scripts/ifup-ipv6 ${CONFIG} if [[ "${DHCPV6C}" = [Yy1]* ]] && [ -x /sbin/dhclient ]; then generate_config_file_name 6 - /sbin/dhclient -6 -1 ${DHCPV6C_OPTIONS} ${DHCLIENTCONF} -lf /var/lib/dhclient/dhclient6-${DEVICE}.leases -pf /var/run/dhclient6-${DEVICE}.pid ${DHCP_HOSTNAME:+-H $DHCP_HOSTNAME} ${DEVICE} + echo + echo -n $"Determining IPv6 information for ${DEVICE}..." + if /sbin/dhclient -6 -1 ${DHCPV6C_OPTIONS} ${DHCLIENTCONF} -lf /var/lib/dhclient/dhclient6-${DEVICE}.leases -pf /var/run/dhclient6-${DEVICE}.pid ${DHCP_HOSTNAME:+-H $DHCP_HOSTNAME} ${DEVICE} ; then + echo $" done." + else + echo $" failed." + if [ "${dhcpipv4}" = "good" -o -n "${IPADDR}" ]; then + net_log "Unable to obtain IPv6 DHCP address ${DEVICE}." warning + else + exit 1 + fi + fi +fi + +if [ "${IPX}" = yes ]; then + /etc/sysconfig/network-scripts/ifup-ipx ${DEVICE} fi exec /etc/sysconfig/network-scripts/ifup-post ${CONFIG} ${2} -- cgit v1.2.1