aboutsummaryrefslogtreecommitdiff
path: root/x200-my.initd
blob: 9d8442d9c6df3c25a726badb113562593a688087 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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
}