wifi executor: fix up some shell nitpicks
This commit is contained in:
parent
589a1f3023
commit
93c8827205
1 changed files with 6 additions and 4 deletions
|
@ -60,7 +60,8 @@ use_supplicant() {
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Start a supplicant process for $IFACE.
|
# Either start a supplicant process for $IFACE, or use iwconfig to trigger an
|
||||||
|
# association attempt.
|
||||||
start() {
|
start() {
|
||||||
if use_supplicant; then
|
if use_supplicant; then
|
||||||
# If there is no config file located at $WIFI_CONFIG_PATH, generate one.
|
# If there is no config file located at $WIFI_CONFIG_PATH, generate one.
|
||||||
|
@ -72,12 +73,13 @@ start() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Stop the supplicant process for $IFACE.
|
# Either stop the supplicant process for $IFACE, or use iwconfig to dissociate
|
||||||
|
# from the current SSID.
|
||||||
stop() {
|
stop() {
|
||||||
if use_supplicant; then
|
if use_supplicant; then
|
||||||
kill -9 $(cat $PIDFILE) 2>/dev/null
|
kill -9 $(cat $PIDFILE) 2>/dev/null
|
||||||
[ -z "$IF_WIFI_CONFIG_PATH" ] && rm $WIFI_CONFIG_PATH
|
[ -z "$IF_WIFI_CONFIG_PATH" ] && rm -- "$WIFI_CONFIG_PATH"
|
||||||
rm $PIDFILE
|
rm -- "$PIDFILE"
|
||||||
else
|
else
|
||||||
/usr/sbin/iwconfig $IFACE essid any
|
/usr/sbin/iwconfig $IFACE essid any
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue