From deed4d3d3cff0fa45d0d0d5aa665db102cdc5ff3 Mon Sep 17 00:00:00 2001 From: Jim Pryor Date: Sun, 13 Sep 2009 23:43:37 -0400 Subject: Sourcing not necessary in get_rf_state, set_rf_state Every time these functions are called, the sourcing has already just been done by the caller. Signed-off-by: Jim Pryor --- src/wireless | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src') diff --git a/src/wireless b/src/wireless index e1d98ab..713beb2 100644 --- a/src/wireless +++ b/src/wireless @@ -169,8 +169,6 @@ wpa_supplicant_scan_info() { set_rf_state() { local INTERFACE="$1" state="$2" PROFILE="$3" - [[ -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") case "$state" in @@ -206,8 +204,7 @@ get_rf_path() { get_rf_state() { local INTERFACE="$1" PROFILE="$2" path state - [[ -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") -- cgit v1.2.3-24-g4f1b