summaryrefslogtreecommitdiff
path: root/core/rfkill/rc.d
diff options
context:
space:
mode:
authorJoshua I. Haase H. (xihh) <hahj87@gmail.com>2012-09-18 23:41:48 -0500
committerJoshua I. Haase H. (xihh) <hahj87@gmail.com>2012-09-18 23:41:48 -0500
commitfa95bb04dbbc63d07b1f84fb8ce5272085097eb7 (patch)
tree09eb51305956e84dfb79aa89f5b99e595371c54d /core/rfkill/rc.d
parent6eefbbf4300e680dc93487c11a1ae35ee8299f06 (diff)
parent5a05be089c68617c86c9c555e63f2b0314451ebf (diff)
Merge branch 'master' of gitpar:abslibre-mips64el
Diffstat (limited to 'core/rfkill/rc.d')
-rwxr-xr-xcore/rfkill/rc.d38
1 files changed, 38 insertions, 0 deletions
diff --git a/core/rfkill/rc.d b/core/rfkill/rc.d
new file mode 100755
index 000000000..ce90ee150
--- /dev/null
+++ b/core/rfkill/rc.d
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/rfkill
+
+case "$1" in
+ start)
+ for device in ${RFKILL_BLOCK}; do
+ stat_busy "Blocking rfkill device: ${device}"
+ /usr/sbin/rfkill block ${device}
+ if [ $? -eq 0 ]; then
+ stat_done
+ else
+ stat_fail
+ fi
+ done
+ for device in ${RFKILL_UNBLOCK}; do
+ stat_busy "Unblocking rfkill device: ${device}"
+ /usr/sbin/rfkill unblock ${device}
+ if [ $? -eq 0 ]; then
+ stat_done
+ else
+ stat_fail
+ fi
+ done
+ ;;
+ stop)
+ ;;
+ restart)
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start}"
+ exit 1
+ ;;
+esac
+exit 0