summaryrefslogtreecommitdiffstats
path: root/wpa_actiond
diff options
context:
space:
mode:
authorJames Rayner <james@archlinux.org>2010-02-21 12:10:21 +0100
committerJames Rayner <james@archlinux.org>2010-02-21 12:10:21 +0100
commitabb0cfbf8f933471847ced6e546c8a192c1169d7 (patch)
treec39eb7f43a40683309d882962ca5806ae6354af2 /wpa_actiond
parent63e1e4c2155c17cea7ed80e83d5feae3a0e44fa5 (diff)
downloadnetctl-abb0cfbf8f933471847ced6e546c8a192c1169d7.tar.gz
netctl-abb0cfbf8f933471847ced6e546c8a192c1169d7.tar.xz
Fix FS#18391, FS#18385, broken rfkill, handle hard more appropriately
Diffstat (limited to 'wpa_actiond')
-rwxr-xr-xwpa_actiond/netcfg-wpa_actiond9
1 files changed, 6 insertions, 3 deletions
diff --git a/wpa_actiond/netcfg-wpa_actiond b/wpa_actiond/netcfg-wpa_actiond
index 84a622d..a90d4cc 100755
--- a/wpa_actiond/netcfg-wpa_actiond
+++ b/wpa_actiond/netcfg-wpa_actiond
@@ -13,10 +13,13 @@ case $1 in
exit
;;
stop)
+ [[ -z $2 ]] && echo "Please specify an interface to stop" && exit 1
+ interface=$2
+ [[ -f "$IFACE_DIR/$interface" ]] && source "$IFACE_DIR/$interface"
stop_wpa $2
kill $(cat "/var/run/wpa_actiond_${2}.pid")
- if [[ -n "$RFKILL" ]]; then # Enable radio if necessary
- set_rf_state "$interface" down || exit $?
+ if [[ -n "$RFKILL" ]]; then
+ set_rf_state "$interface" disabled $RFKILL_NAME || exit $?
fi
exit
;;
@@ -40,7 +43,7 @@ if [[ -f "$CONN_DIR/interfaces/$interface" ]]; then
fi
if [[ -n "$RFKILL" ]]; then # Enable radio if necessary
- set_rf_state "$interface" up || exit $?
+ enable_rf $interface $RFKILL $RFKILL_NAME || exit $?
fi
WPA_CONF="$(make_wpa_config_file $interface)"