From 95d2950eb25cd16f74461ce104eeefd71694b1db Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Sat, 15 Sep 2018 13:00:22 +0200 Subject: added x200-my in conf.d --- x200-my.initd | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'x200-my.initd') 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 @@ description="Removes whining noise from Thinkpads X200 and powers off the wifi on shutdown." -start() { -if [ "${RC_CMD}" = "restart" ]; - then - /usr/bin/nmcli radio all off - fi +command="/usr/bin/intel_reg" +pwmfreq="${PWMFREQ_RATE}" + +command_args="write 0x00061254 $pwmfreq" -/usr/bin/intel_reg write 0x00061254 0x8bb7b16dc5b6a 2>/dev/null +start() { + if [ "${RC_CMD}" = "restart" ]; + then + /usr/bin/nmcli radio all off + fi + + exec $command $command_args 2>/dev/null } stop() { -/usr/bin/nmcli radio all off + /usr/bin/nmcli radio all off } -- cgit v1.2.3