summaryrefslogtreecommitdiffstats
path: root/src/lib/rfkill
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2013-02-20 09:47:51 +0100
committerJouke Witteveen <j.witteveen@gmail.com>2013-02-20 09:47:51 +0100
commitc446fad51d232e6553ca42bcba5930d9cb8556c6 (patch)
tree82c4abe62eeefbb435ae776c258cc6f0fdbb8914 /src/lib/rfkill
parent8ce0e5f57e75c5379c6f5e7503f49eaf62f7162c (diff)
downloadnetctl-c446fad51d232e6553ca42bcba5930d9cb8556c6.tar.gz
netctl-c446fad51d232e6553ca42bcba5930d9cb8556c6.tar.xz
Fix rfkill
Redirecting inside a do_debug call is, of course, impossible.
Diffstat (limited to 'src/lib/rfkill')
-rw-r--r--src/lib/rfkill6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/rfkill b/src/lib/rfkill
index 996e463..e388f08 100644
--- a/src/lib/rfkill
+++ b/src/lib/rfkill
@@ -40,7 +40,8 @@ enable_rf() {
report_error "Transmission is hard-blocked on interface '$interface'"
return 1
elif (( soft )); then
- do_debug echo 0 > "$path/soft"
+ report_debug "$FUNCNAME: echo 0 > '$path/soft'"
+ echo 0 > "$path/soft"
timeout_wait 1 '(( ! $(< "$path/soft") ))'
fi
}
@@ -52,7 +53,8 @@ disable_rf() {
local interface=$1 rfkill=$2 path
path=$(get_rf_path "$interface" "$rfkill") || return 1
- do_debug echo 1 > "$path/soft"
+ report_debug "$FUNCNAME: echo 1 > '$path/soft'"
+ echo 1 > "$path/soft"
timeout_wait 1 '(( $(< "$path/soft") ))'
}