wok-current diff laptop-mode-tools/stuff/laptop-mode.sh @ rev 25685
Add checkspace / fetchall feature for tazpkg
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Thu Mar 14 20:28:39 2024 +0000 (8 months ago) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/laptop-mode-tools/stuff/laptop-mode.sh Thu Mar 14 20:28:39 2024 +0000 1.3 @@ -0,0 +1,26 @@ 1.4 +#!/bin/sh 1.5 +# 1.6 +# /etc/rc.d/laptop-mode: start/stop laptop-mode 1.7 +# 1.8 + 1.9 +case $1 in 1.10 +start) 1.11 + [ ! -d /var/run/laptop-mode-tools ] && install -d /var/run/laptop-mode-tools 1.12 + touch /var/run/laptop-mode-tools/enabled 1.13 + /usr/sbin/laptop_mode auto init >/dev/null 2>&1 1.14 + ;; 1.15 +stop) 1.16 + rm -f /var/run/laptop-mode-tools/enabled 1.17 + ;; 1.18 +restart) 1.19 + /usr/sbin/laptop_mode auto init force >/dev/null 2>&1 1.20 + ;; 1.21 +status) 1.22 + /usr/sbin/laptop_mode status 1.23 + ;; 1.24 +*) 1.25 + echo "usage: $0 [start|stop|restart|status]" 1.26 + ;; 1.27 +esac 1.28 + 1.29 +# End of file