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

Collapse All | Expand All

(-)net.eth0 (+51 lines)
Lines 29-34 Link Here
29
	# No reason to check these multiple times in the file
29
	# No reason to check these multiple times in the file
30
	iface="${1/\./_}"
30
	iface="${1/\./_}"
31
	iface_IFACE="$(eval echo \$\{iface_${iface}\})"
31
	iface_IFACE="$(eval echo \$\{iface_${iface}\})"
32
	wlan_IFACE="$(eval echo \$\{wlan_${iface}\})"
33
	iwpriv_IFACE="$(eval echo \$\{iwpriv_${iface}\})"
32
	dhcpcd_IFACE="$(eval echo \$\{dhcpcd_${iface}\})"
34
	dhcpcd_IFACE="$(eval echo \$\{dhcpcd_${iface}\})"
33
	inet6_IFACE="$(eval echo \$\{inet6_${iface}\})"
35
	inet6_IFACE="$(eval echo \$\{inet6_${iface}\})"
34
	alias_IFACE="$(eval echo \$\{alias_${iface}\})"
36
	alias_IFACE="$(eval echo \$\{alias_${iface}\})"
Lines 57-62 Link Here
57
			eend ${retval} "Failed to bring ${IFACE} up"
59
			eend ${retval} "Failed to bring ${IFACE} up"
58
			return ${retval}
60
			return ${retval}
59
		}
61
		}
62
		
63
		# Deal with the wireless-specific parameters. Note that 
64
		# these don't need dealing with in stop().
65
		
66
		echo "iface = ${IFACE}"
67
		echo "iface_IFACE = ${iface_IFACE}"
68
		echo "wlan_IFACE = ${wlan_IFACE}"
69
		echo "iwpriv_IFACE = ${iwpriv_IFACE}"
70
		
71
		# Are we dealing with a wlan interface?
72
		if [ -n "${wlan_IFACE}" ]
73
		then
74
			ebegin "Setting wireless parameters for ${IFACE}"
75
			
76
			# Do we have wireless-tools installed?
77
			if [ ! -x /usr/sbin/iwconfig ]
78
			then
79
				eerror "wlan_${IFACE} was set, but iwconfig was not found or not executable."
80
				eerror "emerge wireless-tools to fix this."
81
				eend 1 "Failed to set wireless parameters for ${IFACE}"
82
				return 1
83
			fi
84
			
85
			/usr/sbin/iwconfig ${IFACE} ${wlan_IFACE} || {
86
				retval=$?
87
				eend ${retval} "Failed to set wireless parameters for ${IFACE}"
88
				return ${retval}
89
			}
90
		fi
91
92
		# Do we have to deal with iwpriv?
93
		if [ -n "${iwpriv_IFACE}" ]
94
		then
95
			ebegin "Setting iwpriv parameters for ${IFACE}"
96
97
			if [ ! -x /usr/sbin/iwpriv ]
98
			then
99
				eerror "iwpriv_${IFACE} was set, but iwpriv was not found or not executable."
100
				eerror "emerge wireless-tools to fix this."
101
				eend 1 "Failed to set iwpriv parameters for ${IFACE}"
102
				return 1
103
			fi
104
			
105
			/usr/sbin/iwpriv ${IFACE} ${iwpriv_IFACE} || {
106
				retval=$?
107
				eend ${retval} "Failed to set iwpriv parameters for ${IFACE}"
108
				return ${retval}
109
			}
110
		fi
60
	else
111
	else
61
		# Check that eth0 was not brough up by the kernel ...
112
		# Check that eth0 was not brough up by the kernel ...
62
		if [ "${status_IFACE}" != "up" ]
113
		if [ "${status_IFACE}" != "up" ]

Return to bug 25742