diff options
-rw-r--r-- | src-wireless/netcfg-auto-wireless | 2 | ||||
-rw-r--r-- | src/wireless | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src-wireless/netcfg-auto-wireless b/src-wireless/netcfg-auto-wireless index 892d5a8..7bb8dbb 100644 --- a/src-wireless/netcfg-auto-wireless +++ b/src-wireless/netcfg-auto-wireless @@ -11,7 +11,7 @@ wifi_auto() { local interface="$1" report_try "Scanning for networks" - source $IFACE_DIR/$interface + [[ -f "$IFACE_DIR/$interface" ]] && source "$IFACE_DIR/$interface" if [[ -n "$RFKILL" ]]; then set_rf_state "$interface" up diff --git a/src/wireless b/src/wireless index b9ce12a..e1d98ab 100644 --- a/src/wireless +++ b/src/wireless @@ -169,7 +169,7 @@ wpa_supplicant_scan_info() { set_rf_state() { local INTERFACE="$1" state="$2" PROFILE="$3" - source "$IFACE_DIR/$INTERFACE" + [[ -f "$IFACE_DIR/$INTERFACE" ]] && source "$IFACE_DIR/$INTERFACE" [[ -n "$PROFILE" ]] && source "$PROFILE_DIR/$PROFILE" # profile overrides [[ $RFKILL == "hard" ]] && report_fail "Cannot set state on hardware rfkill switch" local path=$(get_rf_path "$INTERFACE" "$RFKILL_NAME") @@ -206,7 +206,7 @@ get_rf_path() { get_rf_state() { local INTERFACE="$1" PROFILE="$2" path state - source "$IFACE_DIR/$INTERFACE" + [[ -f "$IFACE_DIR/$INTERFACE" ]] && source "$IFACE_DIR/$INTERFACE" [[ -n "$PROFILE" ]] && source "$PROFILE_DIR/$PROFILE" # profile overrides path=$(get_rf_path "$INTERFACE" "$RFKILL_NAME") state=$(cat "$path/state") |