Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 33272 | Differences between
and this patch

Collapse All | Expand All

(-)init.d/net.eth0 (-3 / +9 lines)
Lines 32-39 Link Here
32
	dhcpcd_IFACE="$(eval echo \$\{dhcpcd_${iface}\})"
32
	dhcpcd_IFACE="$(eval echo \$\{dhcpcd_${iface}\})"
33
	inet6_IFACE="$(eval echo \$\{inet6_${iface}\})"
33
	inet6_IFACE="$(eval echo \$\{inet6_${iface}\})"
34
	alias_IFACE="$(eval echo \$\{alias_${iface}\})"
34
	alias_IFACE="$(eval echo \$\{alias_${iface}\})"
35
	status_IFACE="$(ifconfig | gawk -v IFACE="${iface}" '/Link/ { if ($1 == IFACE) print "up" }')"
35
	status_IFACE="$(ifconfig | gawk -v IFACE="${iface}" '$0 ~ /Link/ { if ($1 == IFACE) print "up" }')"
36
	carrier_IFACE="$(ifconfig | gawk -v IFACE="${iface}" '/RUNNING/ { if ($1 == IFACE) print "running" }')"
37
	vlans="$(eval echo \$\{iface_${IFACE}_vlans\})"
36
	vlans="$(eval echo \$\{iface_${IFACE}_vlans\})"
38
}
37
}
39
38
Lines 62-69 Link Here
62
		# Check that eth0 was not brough up by the kernel ...
61
		# Check that eth0 was not brough up by the kernel ...
63
		if [ "${status_IFACE}" != "up" ]
62
		if [ "${status_IFACE}" != "up" ]
64
		then
63
		then
64
			# The interface has to be up before we can check
65
			# that it has a carrier ...
66
			/sbin/ifconfig ${IFACE} up >/dev/null || {
67
				retval=$?
68
				eend ${retval} "Failed to bring ${IFACE} up"
69
				return ${retval}
70
			}
65
			# Check that the interface has a carrier
71
			# Check that the interface has a carrier
66
			if [ "${carrier_IFACE}" = "running" ]
72
			if ifconfig ${IFACE} | grep -qc 'RUNNING' &>/dev/null
67
			then
73
			then
68
				/sbin/dhcpcd ${dhcpcd_IFACE} ${IFACE} >/dev/null || {
74
				/sbin/dhcpcd ${dhcpcd_IFACE} ${IFACE} >/dev/null || {
69
					retval=$?
75
					retval=$?

Return to bug 33272