summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2012-07-05 13:17:13 +0200
committerJouke Witteveen <j.witteveen@gmail.com>2012-07-05 13:17:13 +0200
commit0f5eb3ef064c4a62a5ba3c8f4733f8e61556687b (patch)
treed3149db9fdc1a9513a169f8877291992e0581d78 /scripts
parentc2036ac1ab643040d6cf98e682ed171114d87090 (diff)
downloadnetctl-0f5eb3ef064c4a62a5ba3c8f4733f8e61556687b.tar.gz
netctl-0f5eb3ef064c4a62a5ba3c8f4733f8e61556687b.tar.xz
Rethink management of socket location for wpa_supplicant
This may be set in a custom supplicant configuration file. All this is needed to cater for that. The new name of the tracking variable is WPA_CTRL_DIR, conform the environment variable of wpa_cli -a.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/netcfg-wpa_actiond3
-rwxr-xr-xscripts/wifi-menu6
2 files changed, 2 insertions, 7 deletions
diff --git a/scripts/netcfg-wpa_actiond b/scripts/netcfg-wpa_actiond
index 744b7af..f2d2382 100755
--- a/scripts/netcfg-wpa_actiond
+++ b/scripts/netcfg-wpa_actiond
@@ -18,7 +18,6 @@ case $1 in
interface=$2
[[ -f "$IFACE_DIR/$interface" ]] && source "$IFACE_DIR/$interface"
netcfg -D "$interface"
- stop_wpa "$interface"
kill $(< "/run/wpa_actiond_${2}.pid")
# only try to disable software rfkill switches (FS#25514)
if [[ "$RFKILL" == "soft" ]]; then
@@ -81,7 +80,7 @@ done
WPA_OPTS="-W $WPA_OPTS"
# Kill any existing wpa_supplicant on this interface
-stop_wpa "$interface"
+stop_wpa "$interface" &> /dev/null
if start_wpa $interface $WPA_CONF $WPA_DRIVER $WPA_OPTS; then
if $AUTOWIFI -i ${interface} -P ${PIDFILE} -a ${ACTION_SCRIPT} ${EXTRA_AUTOWIFI_OPTIONS}; then
diff --git a/scripts/wifi-menu b/scripts/wifi-menu
index 3d7ed57..bbc2bf5 100755
--- a/scripts/wifi-menu
+++ b/scripts/wifi-menu
@@ -4,9 +4,6 @@
. "$SUBR_DIR/8021x"
. /etc/conf.d/netcfg
-# The right value depends on the connected profile.
-WPA_CTRL_PATH=/run/wpa_supplicant
-
usage()
{
cat << END
@@ -211,8 +208,7 @@ if ! interface_is_up "$INTERFACE"; then
fi
report_try "Scanning for networks"
-CONNECTION=$(wpa_cli -p "$WPA_CTRL_PATH" -i "$INTERFACE" status 2> /dev/null \
- | grep -m 1 "^ssid=")
+CONNECTION=$(wpa_call "$INTERFACE" status 2> /dev/null | grep -m 1 "^ssid=")
CONNECTION=${CONNECTION#ssid=}
NETWORKS=$(wpa_supplicant_scan_info "$INTERFACE" 3,4,5)
if [[ $? -eq 0 ]]; then