summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrik Brix Andersen <brix@gentoo.org>2005-07-29 09:24:33 +0000
committerHenrik Brix Andersen <brix@gentoo.org>2005-07-29 09:24:33 +0000
commit7e33148e392d4ccdd4f019111fce647b725c874f (patch)
tree3a82cc350a8bcbcfad9e585a4aa0cbd3600a2e41 /app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.06-init.d
parentFix bad depend atom (#100657). (diff)
downloadgentoo-2-7e33148e392d4ccdd4f019111fce647b725c874f.tar.gz
gentoo-2-7e33148e392d4ccdd4f019111fce647b725c874f.tar.bz2
gentoo-2-7e33148e392d4ccdd4f019111fce647b725c874f.zip
Version bump.
(Portage version: 2.0.51.22-r2)
Diffstat (limited to 'app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.06-init.d')
-rw-r--r--app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.06-init.d25
1 files changed, 25 insertions, 0 deletions
diff --git a/app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.06-init.d b/app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.06-init.d
new file mode 100644
index 000000000000..59793f9ce546
--- /dev/null
+++ b/app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.06-init.d
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2005 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.06-init.d,v 1.1 2005/07/29 09:24:33 brix Exp $
+
+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 &> /dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping laptop_mode"
+ /usr/sbin/laptop_mode stop &> /dev/null && rm -f /var/run/laptop-mode-enabled
+ eend $?
+}