aboutsummaryrefslogtreecommitdiff
path: root/x200-my.initd
diff options
context:
space:
mode:
Diffstat (limited to 'x200-my.initd')
-rw-r--r--x200-my.initd19
1 files changed, 12 insertions, 7 deletions
diff --git a/x200-my.initd b/x200-my.initd
index 9d8442d..8edefd6 100644
--- a/x200-my.initd
+++ b/x200-my.initd
@@ -4,15 +4,20 @@
4 4
5description="Removes whining noise from Thinkpads X200 and powers off the wifi on shutdown." 5description="Removes whining noise from Thinkpads X200 and powers off the wifi on shutdown."
6 6
7start() { 7command="/usr/bin/intel_reg"
8if [ "${RC_CMD}" = "restart" ]; 8pwmfreq="${PWMFREQ_RATE}"
9 then 9
10 /usr/bin/nmcli radio all off 10command_args="write 0x00061254 $pwmfreq"
11 fi
12 11
13/usr/bin/intel_reg write 0x00061254 0x8bb7b16dc5b6a 2>/dev/null 12start() {
13 if [ "${RC_CMD}" = "restart" ];
14 then
15 /usr/bin/nmcli radio all off
16 fi
17
18 exec $command $command_args 2>/dev/null
14} 19}
15 20
16stop() { 21stop() {
17/usr/bin/nmcli radio all off 22 /usr/bin/nmcli radio all off
18} 23}