diff options
Diffstat (limited to 'x200-my.initd')
-rw-r--r-- | x200-my.initd | 18 |
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 | |||
5 | description="Removes whining noise from Thinkpads X200 and powers off the wifi on shutdown." | ||
6 | |||
7 | start() { | ||
8 | if [ "${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 | |||
16 | stop() { | ||
17 | /usr/bin/nmcli radio all off | ||
18 | } | ||