Lines 64-70
Link Here
|
64 |
# |
64 |
# |
65 |
# Checks to see if wireless extensions are enabled on the interface |
65 |
# Checks to see if wireless extensions are enabled on the interface |
66 |
wpa_supplicant_check_extensions() { |
66 |
wpa_supplicant_check_extensions() { |
67 |
grep -q "${1}: " /proc/net/wireless |
67 |
grep -q "${1}: " /proc/net/wireless 2> /dev/null |
68 |
} |
68 |
} |
69 |
|
69 |
|
70 |
# char* wpa_supplicant_get_essid(char *interface) |
70 |
# char* wpa_supplicant_get_essid(char *interface) |
Lines 157-166
Link Here
|
157 |
# Returns 0 (true) when successful, non-zero otherwise |
157 |
# Returns 0 (true) when successful, non-zero otherwise |
158 |
wpa_supplicant_pre_start() { |
158 |
wpa_supplicant_pre_start() { |
159 |
local iface=$1 opts ifvar cfgfile=/etc/wpa_supplicant.conf timeout |
159 |
local iface=$1 opts ifvar cfgfile=/etc/wpa_supplicant.conf timeout |
160 |
|
160 |
|
161 |
# We only work on wirelesss interfaces |
161 |
ifvar=$( interface_variable ${iface} ) |
162 |
wpa_supplicant_check_extensions ${iface} || return 0 |
162 |
eval opts=\" \$\{wpa_supplicant_${ifvar}\}\" |
163 |
|
163 |
|
|
|
164 |
# We work not only on wirelesss interfaces |
165 |
if [[ ${opts} != *' -Dwired'* ]]; then |
166 |
wpa_supplicant_check_extensions ${iface} || return 0 |
167 |
fi |
164 |
# Kill off any existing wpa_supplicant on this interface |
168 |
# Kill off any existing wpa_supplicant on this interface |
165 |
# This is so we can re-read the configuration file and clean any stale |
169 |
# This is so we can re-read the configuration file and clean any stale |
166 |
# directories |
170 |
# directories |
Lines 189-196
Link Here
|
189 |
return 1 |
193 |
return 1 |
190 |
fi |
194 |
fi |
191 |
|
195 |
|
192 |
ifvar=$( interface_variable ${iface} ) |
|
|
193 |
eval opts=\" \$\{wpa_supplicant_${ifvar}\}\" |
194 |
[[ ${opts} != *' -D'* ]] && ewarn "wpa_supplicant_${ifvar} does not define a driver" |
196 |
[[ ${opts} != *' -D'* ]] && ewarn "wpa_supplicant_${ifvar} does not define a driver" |
195 |
|
197 |
|
196 |
# Some drivers require the interface to be up |
198 |
# Some drivers require the interface to be up |