summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIvan Shapovalov <intelfx100@gmail.com>2012-10-07 22:06:19 +0200
committerJouke Witteveen <j.witteveen@gmail.com>2012-10-12 15:30:33 +0200
commit186e931130623eae0c5ef4dc69c6672a74178e39 (patch)
tree2a1f241ca9d7ec62862d0ddf9de74ab3405e04a0 /src
parent904b15f9dfe84d767e436dd30a5b726718cdb2e3 (diff)
downloadnetctl-186e931130623eae0c5ef4dc69c6672a74178e39.tar.gz
netctl-186e931130623eae0c5ef4dc69c6672a74178e39.tar.xz
Exit from stop_wpa() if there's nothing to terminate.
Check "$WPA_CONF_DIR/$INTERFACE" for existence; exit if it's absent (that is, wpa_supplicant isn't running). Just avoids an error message from wpa_cli. Signed-off-by: Ivan Shapovalov <intelfx100@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/8021x3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/8021x b/src/8021x
index e9c8af2..d2ddfe4 100644
--- a/src/8021x
+++ b/src/8021x
@@ -73,6 +73,9 @@ stop_wpa()
# we need this as long as wpa_cli has a different default than netcfg
[[ -z "$WPA_CTRL_DIR" && -z "$WPA_CONF" ]] && WPA_CTRL_DIR="/run/wpa_supplicant"
+ # done if wpa_supplicant is already terminated for this interface
+ [[ -e "$WPA_CTRL_DIR/$INTERFACE" ]] || return
+
wpa_call "$INTERFACE" terminate > /dev/null
# wait up to one second for the pid file to be removed