diff options
Diffstat (limited to 'src/wireless')
-rw-r--r-- | src/wireless | 4 |
1 files changed, 2 insertions, 2 deletions
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") |