diff --git a/src/connections/wireless b/src/connections/wireless index 7ed5abe..a52972a 100644 --- a/src/connections/wireless +++ b/src/connections/wireless @@ -122,7 +122,6 @@ wireless_down() { # Handle wireless kill switches # Any reason why a hardware switch should be considered on interface down? if [[ "$RFKILL" == "soft" ]]; then - . "$SUBR_DIR/wireless" set_rf_state "$INTERFACE" disabled $RFKILL_NAME || return 1 fi } diff --git a/wpa_actiond/netcfg-wpa_actiond b/wpa_actiond/netcfg-wpa_actiond index 9ad319f..b1a1e1f 100755 --- a/wpa_actiond/netcfg-wpa_actiond +++ b/wpa_actiond/netcfg-wpa_actiond @@ -21,10 +21,11 @@ case $1 in netcfg -i "$interface" stop_wpa "$interface" kill $(cat "/run/wpa_actiond_${2}.pid") - if [[ -n "$RFKILL" ]]; then + # disable radio with "soft" rfkill only + if [[ "$RFKILL" == "soft" ]]; then set_rf_state "$interface" disabled $RFKILL_NAME || exit $? fi - exit + exit 0 ;; *) interface=$1; shift @@ -65,9 +66,9 @@ fi | while read profile; do # Exclude wpa-config, the wpa_conf is 'complete' and doesn't fit in this scheme [[ -z "$SECURITY" ]] && SECURITY="none" [[ $SECURITY == "wpa-config" ]] && exit 1 - + config=$(make_wpa_config) - + echo -e "network={ \n$config \nid_str=\"$profile\" \n}" >> $WPA_CONF ) done