blob: 5afc7d864507946522400083dc90aa5b0fc79498 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#!/sbin/runscript
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.27-init.d,v 1.1 2006/02/18 23:27:41 brix Exp $
opts="${opts} reload"
checkconfig() {
if [[ ! -f /proc/sys/vm/laptop_mode ]]; then
eerror "Kernel does not support laptop_mode"
return 1
fi
}
start() {
checkconfig || return 1
ebegin "Starting laptop_mode"
touch /var/run/laptop-mode-enabled
/usr/sbin/laptop_mode auto init &> /dev/null
eend ${?}
}
stop() {
ebegin "Stopping laptop_mode"
rm -f /var/run/laptop-mode-enabled
/usr/sbin/laptop_mode stop init &> /dev/null
eend ${?}
}
reload() {
ebegin "Restarting laptop_mode"
/usr/sbin/laptop_mode auto init force &> /dev/null
eend ${?}
}
|