summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Pryor <profjim@jimpryor.net>2009-09-14 05:43:37 +0200
committerJames Rayner <james@archlinux.org>2009-09-14 08:23:27 +0200
commitdeed4d3d3cff0fa45d0d0d5aa665db102cdc5ff3 (patch)
treec3566be77da73f67933cc93e4dd4aea2907842a7
parent5a2279c70d1c6db3afab45f4ff6df420daa514e9 (diff)
downloadnetctl-deed4d3d3cff0fa45d0d0d5aa665db102cdc5ff3.tar.gz
netctl-deed4d3d3cff0fa45d0d0d5aa665db102cdc5ff3.tar.xz
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 <profjim@jimpryor.net>
-rw-r--r--src/wireless5
1 files changed, 1 insertions, 4 deletions
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")