aboutsummaryrefslogtreecommitdiff
path: root/x200-my.initd
diff options
context:
space:
mode:
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}