diff options
author | Ivan Shapovalov <intelfx100@gmail.com> | 2012-10-07 22:06:19 +0200 |
---|---|---|
committer | Jouke Witteveen <j.witteveen@gmail.com> | 2012-10-12 15:30:33 +0200 |
commit | 186e931130623eae0c5ef4dc69c6672a74178e39 (patch) | |
tree | 2a1f241ca9d7ec62862d0ddf9de74ab3405e04a0 | |
parent | 904b15f9dfe84d767e436dd30a5b726718cdb2e3 (diff) | |
download | netctl-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>
-rw-r--r-- | src/8021x | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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 |