aboutsummaryrefslogtreecommitdiff
path: root/x200-my.initd
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2018-09-10 10:41:38 +0200
committerRobert Alessi <alessi@robertalessi.net>2018-09-10 10:41:38 +0200
commit63712843c3541afcf25bcc8f24b46de7bbc8b400 (patch)
treea9c54f91074a51314dfb48713a727498477df5a2 /x200-my.initd
downloadx200-my-63712843c3541afcf25bcc8f24b46de7bbc8b400.tar.gz
initial commit0.1-2
Diffstat (limited to 'x200-my.initd')
-rw-r--r--x200-my.initd18
1 files changed, 18 insertions, 0 deletions
diff --git a/x200-my.initd b/x200-my.initd
new file mode 100644
index 0000000..9d8442d
--- /dev/null
+++ b/x200-my.initd
@@ -0,0 +1,18 @@
1#!/sbin/openrc-run
2# Copyright 2018 Robert Alessi
3# Distributed under the terms of the GNU General Public License v2
4
5description="Removes whining noise from Thinkpads X200 and powers off the wifi on shutdown."
6
7start() {
8if [ "${RC_CMD}" = "restart" ];
9 then
10 /usr/bin/nmcli radio all off
11 fi
12
13/usr/bin/intel_reg write 0x00061254 0x8bb7b16dc5b6a 2>/dev/null
14}
15
16stop() {
17/usr/bin/nmcli radio all off
18}