From abb0cfbf8f933471847ced6e546c8a192c1169d7 Mon Sep 17 00:00:00 2001 From: James Rayner Date: Sun, 21 Feb 2010 22:10:21 +1100 Subject: Fix FS#18391, FS#18385, broken rfkill, handle hard more appropriately --- wpa_actiond/netcfg-wpa_actiond | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'wpa_actiond/netcfg-wpa_actiond') 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)" -- cgit v1.2.3-24-g4f1b