Only configure SSID if we are running on a wireless interface.
This commit is contained in:
parent
159fc8b4ad
commit
7a18054fbe
@ -63,7 +63,7 @@ _get_ap_mac_address() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
wpa_supplicant_pre_start() {
|
wpa_supplicant_pre_start() {
|
||||||
local opts= cfgfile= ctrl_dir=
|
local opts= cfgfile= ctrl_dir= wireless=true
|
||||||
local wpas=/usr/sbin/wpa_supplicant wpac=/usr/bin/wpa_cli
|
local wpas=/usr/sbin/wpa_supplicant wpac=/usr/bin/wpa_cli
|
||||||
|
|
||||||
if [ ! -x "${wpas}" ]; then
|
if [ ! -x "${wpas}" ]; then
|
||||||
@ -74,14 +74,14 @@ wpa_supplicant_pre_start() {
|
|||||||
|
|
||||||
eval opts=\$wpa_supplicant_${IFVAR}
|
eval opts=\$wpa_supplicant_${IFVAR}
|
||||||
case " ${opts} " in
|
case " ${opts} " in
|
||||||
*" -Dwired "*);;
|
*" -Dwired "*) wireless=false;;
|
||||||
*) _is_wireless || return 0;;
|
*) _is_wireless || return 0;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# We don't configure wireless if we're being called from
|
# We don't configure wireless if we're being called from
|
||||||
# the background unless we're not currently running
|
# the background unless we're not currently running
|
||||||
if yesno ${IN_BACKGROUND}; then
|
if yesno ${IN_BACKGROUND}; then
|
||||||
if service_started_daemon "${SVCNAME}" "${wpas}"; then
|
if ${wireless} && service_started_daemon "${SVCNAME}" "${wpas}"; then
|
||||||
SSID=$(_get_ssid "${IFACE}")
|
SSID=$(_get_ssid "${IFACE}")
|
||||||
SSIDVAR=$(_shell_var "${SSID}")
|
SSIDVAR=$(_shell_var "${SSID}")
|
||||||
save_options "SSID" "${SSID}"
|
save_options "SSID" "${SSID}"
|
||||||
|
Loading…
Reference in New Issue
Block a user