Difference between revisions of "Code/fan-enable.init"
(moved from ACPI fan control script) |
(Script in pre block) |
||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
| + | <pre> | ||
#!/bin/sh | #!/bin/sh | ||
| Line 25: | Line 26: | ||
exit 0 | exit 0 | ||
| + | </pre> | ||
Latest revision as of 08:21, 11 April 2025
#!/bin/sh
N=/etc/init.d/fan
set -e
case "$1" in
start)
# make sure privileges don't persist across reboots
if [ -d /var/run/fan ] && [ "x`ls /var/run/fan`" != x ]
then
touch -t 198501010000 /var/run/fan/*
fi
fan.sh & # Script from above
;;
stop|reload|restart|force-reload)
killall fan.sh
echo enable > /proc/acpi/ibm/fan
;;
*)
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0