Lines 24-31
Link Here
|
24 |
checkconfig || return 1 |
24 |
checkconfig || return 1 |
25 |
local iface_args="$(eval echo \$\{iface_${IFACE}\})" |
25 |
local iface_args="$(eval echo \$\{iface_${IFACE}\})" |
26 |
local dhcp_args="$(eval echo \$\{dhcpcd_${IFACE}\})" |
26 |
local dhcp_args="$(eval echo \$\{dhcpcd_${IFACE}\})" |
|
|
27 |
local iwessid_args="$(eval echo \$\{iwessid_${IFACE}\})" |
28 |
local iwkey_args="$(eval echo \$\{iwkey_${IFACE}\})" |
29 |
local iwmode_args="$(eval echo \$\{iwmode_${IFACE}\})" |
30 |
local iwfreq_args="$(eval echo \$\{iwfreq_${IFACE}\})" |
31 |
local iwchannel_args="$(eval echo \$\{iwchannel_${IFACE}\})" |
32 |
local iwrate_args="$(eval echo \$\{iwrate_${IFACE}\})" |
27 |
local retval=0 |
33 |
local retval=0 |
28 |
ebegin "Bringing ${IFACE} up" |
34 |
ebegin "Bringing ${IFACE} up" |
|
|
35 |
|
36 |
|
37 |
# set wireless options |
38 |
if [ -n "$(eval echo \$\{iwfreq_${IFACE}\})" ] |
39 |
then |
40 |
/usr/sbin/iwconfig ${IFACE} freq ${iwfreq_args} > /dev/null || { |
41 |
retval=$? |
42 |
eend ${retval} "Failed to bring ${IFACE} up" |
43 |
return ${retval} |
44 |
} |
45 |
fi |
46 |
|
47 |
if [ -n "$(eval echo \$\{iwchannel_${IFACE}\})" ] |
48 |
then |
49 |
/usr/sbin/iwconfig ${IFACE} channel ${iwchannel_args} > /dev/null || { |
50 |
retval=$? |
51 |
eend ${retval} "Failed to bring ${IFACE} up" |
52 |
return ${retval} |
53 |
} |
54 |
fi |
55 |
|
56 |
if [ -n "$(eval echo \$\{iwmode_${IFACE}\})" ] |
57 |
then |
58 |
/usr/sbin/iwconfig ${IFACE} mode ${iwmode_args} > /dev/null || { |
59 |
retval=$? |
60 |
eend ${retval} "Failed to bring ${IFACE} up" |
61 |
return ${retval} |
62 |
} |
63 |
fi |
64 |
|
65 |
if [ -n "$(eval echo \$\{iwrate_${IFACE}\})" ] |
66 |
then |
67 |
/usr/sbin/iwconfig ${IFACE} rate ${iwrate_args} > /dev/null || { |
68 |
retval=$? |
69 |
eend ${retval} "Failed to bring ${IFACE} up" |
70 |
return ${retval} |
71 |
} |
72 |
fi |
73 |
|
74 |
if [ -n "$(eval echo \$\{iwessid_${IFACE}\})" ] |
75 |
then |
76 |
/usr/sbin/iwconfig ${IFACE} essid ${iwessid_args} > /dev/null || { |
77 |
retval=$? |
78 |
eend ${retval} "Failed to bring ${IFACE} up" |
79 |
return ${retval} |
80 |
} |
81 |
fi |
82 |
|
83 |
|
84 |
if [ -n "$(eval echo \$\{iwkey_${IFACE}\})" ] |
85 |
then |
86 |
/usr/sbin/iwconfig ${IFACE} key ${iwkey_args} > /dev/null || { |
87 |
retval=$? |
88 |
eend ${retval} "Failed to bring ${IFACE} up" |
89 |
return ${retval} |
90 |
} |
91 |
fi |
92 |
|
93 |
|
29 |
if [ "$(eval echo \$\{iface_${IFACE}\})" != "dhcp" ] |
94 |
if [ "$(eval echo \$\{iface_${IFACE}\})" != "dhcp" ] |
30 |
then |
95 |
then |
31 |
/sbin/ifconfig ${IFACE} ${iface_args} >/dev/null || { |
96 |
/sbin/ifconfig ${IFACE} ${iface_args} >/dev/null || { |