From 63712843c3541afcf25bcc8f24b46de7bbc8b400 Mon Sep 17 00:00:00 2001 From: Robert Alessi Date: Mon, 10 Sep 2018 10:41:38 +0200 Subject: initial commit --- x200-my.initd | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 x200-my.initd (limited to 'x200-my.initd') 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 @@ +#!/sbin/openrc-run +# Copyright 2018 Robert Alessi +# Distributed under the terms of the GNU General Public License v2 + +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 + +/usr/bin/intel_reg write 0x00061254 0x8bb7b16dc5b6a 2>/dev/null +} + +stop() { +/usr/bin/nmcli radio all off +} -- cgit v1.2.3