diff options
author | Robert Alessi <alessi@robertalessi.net> | 2018-09-15 13:00:22 +0200 |
---|---|---|
committer | Robert Alessi <alessi@robertalessi.net> | 2018-09-15 13:00:22 +0200 |
commit | 95d2950eb25cd16f74461ce104eeefd71694b1db (patch) | |
tree | 9aed94ca12bac79cde171e0aa08d73797cd67280 /x200-my.initd | |
parent | 63712843c3541afcf25bcc8f24b46de7bbc8b400 (diff) | |
download | courses-0.2.tar.gz |
added x200-my in conf.d0.2
Diffstat (limited to 'x200-my.initd')
-rw-r--r-- | x200-my.initd | 19 |
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 | ||
5 | description="Removes whining noise from Thinkpads X200 and powers off the wifi on shutdown." | 5 | description="Removes whining noise from Thinkpads X200 and powers off the wifi on shutdown." |
6 | 6 | ||
7 | start() { | 7 | command="/usr/bin/intel_reg" |
8 | if [ "${RC_CMD}" = "restart" ]; | 8 | pwmfreq="${PWMFREQ_RATE}" |
9 | then | 9 | |
10 | /usr/bin/nmcli radio all off | 10 | command_args="write 0x00061254 $pwmfreq" |
11 | fi | ||
12 | 11 | ||
13 | /usr/bin/intel_reg write 0x00061254 0x8bb7b16dc5b6a 2>/dev/null | 12 | start() { |
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 | ||
16 | stop() { | 21 | stop() { |
17 | /usr/bin/nmcli radio all off | 22 | /usr/bin/nmcli radio all off |
18 | } | 23 | } |