diff options
author | James Rayner <james@archlinux.org> | 2010-02-21 12:10:21 +0100 |
---|---|---|
committer | James Rayner <james@archlinux.org> | 2010-02-21 12:10:21 +0100 |
commit | abb0cfbf8f933471847ced6e546c8a192c1169d7 (patch) | |
tree | c39eb7f43a40683309d882962ca5806ae6354af2 /wpa_actiond/netcfg-wpa_actiond | |
parent | 63e1e4c2155c17cea7ed80e83d5feae3a0e44fa5 (diff) | |
download | netctl-abb0cfbf8f933471847ced6e546c8a192c1169d7.tar.gz netctl-abb0cfbf8f933471847ced6e546c8a192c1169d7.tar.xz |
Fix FS#18391, FS#18385, broken rfkill, handle hard more appropriately
Diffstat (limited to 'wpa_actiond/netcfg-wpa_actiond')
-rwxr-xr-x | wpa_actiond/netcfg-wpa_actiond | 9 |
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)" |