wok annotate laptop-mode-tools/stuff/laptop-mode.sh @ rev 17435
Up: minitube (2.3.1)
author | Xander Ziiryanoff <psychomaniak@xakep.ru> |
---|---|
date | Sun Dec 07 16:24:42 2014 +0100 (2014-12-07) |
parents | |
children |
rev | line source |
---|---|
hipeng@10961 | 1 #!/bin/sh |
hipeng@10961 | 2 # |
hipeng@10961 | 3 # /etc/rc.d/laptop-mode: start/stop laptop-mode |
hipeng@10961 | 4 # |
hipeng@10961 | 5 |
hipeng@10961 | 6 case $1 in |
hipeng@10961 | 7 start) |
hipeng@10961 | 8 [ ! -d /var/run/laptop-mode-tools ] && install -d /var/run/laptop-mode-tools |
hipeng@10961 | 9 touch /var/run/laptop-mode-tools/enabled |
hipeng@10961 | 10 /usr/sbin/laptop_mode auto init >/dev/null 2>&1 |
hipeng@10961 | 11 ;; |
hipeng@10961 | 12 stop) |
hipeng@10961 | 13 rm -f /var/run/laptop-mode-tools/enabled |
hipeng@10961 | 14 ;; |
hipeng@10961 | 15 restart) |
hipeng@10961 | 16 /usr/sbin/laptop_mode auto init force >/dev/null 2>&1 |
hipeng@10961 | 17 ;; |
hipeng@10961 | 18 status) |
hipeng@10961 | 19 /usr/sbin/laptop_mode status |
hipeng@10961 | 20 ;; |
hipeng@10961 | 21 *) |
hipeng@10961 | 22 echo "usage: $0 [start|stop|restart|status]" |
hipeng@10961 | 23 ;; |
hipeng@10961 | 24 esac |
hipeng@10961 | 25 |
hipeng@10961 | 26 # End of file |