diff options
author | Henrik Brix Andersen <brix@gentoo.org> | 2005-03-22 18:52:40 +0000 |
---|---|---|
committer | Henrik Brix Andersen <brix@gentoo.org> | 2005-03-22 18:52:40 +0000 |
commit | 91072cf4afb1b6de11b7149d96e0224746088d13 (patch) | |
tree | 655a739c4c852298bc95709891854726f2f56bc9 /app-laptop/laptop-mode-tools/files | |
parent | spelling fix (diff) | |
download | historical-91072cf4afb1b6de11b7149d96e0224746088d13.tar.gz historical-91072cf4afb1b6de11b7149d96e0224746088d13.tar.bz2 historical-91072cf4afb1b6de11b7149d96e0224746088d13.zip |
Initial import, fixes bug #45593. Thank you to all who commented on the bug report.
Package-Manager: portage-2.0.51.19
Diffstat (limited to 'app-laptop/laptop-mode-tools/files')
-rw-r--r-- | app-laptop/laptop-mode-tools/files/digest-laptop-mode-tools-1.04 | 1 | ||||
-rw-r--r-- | app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.04.init | 25 |
2 files changed, 26 insertions, 0 deletions
diff --git a/app-laptop/laptop-mode-tools/files/digest-laptop-mode-tools-1.04 b/app-laptop/laptop-mode-tools/files/digest-laptop-mode-tools-1.04 new file mode 100644 index 000000000000..1dbed76c46c5 --- /dev/null +++ b/app-laptop/laptop-mode-tools/files/digest-laptop-mode-tools-1.04 @@ -0,0 +1 @@ +MD5 b26fcc4df2b38da17e4f09872a1cfeda laptop-mode-tools_1.04.tar.gz 30908 diff --git a/app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.04.init b/app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.04.init new file mode 100644 index 000000000000..d05d8e8c94c9 --- /dev/null +++ b/app-laptop/laptop-mode-tools/files/laptop-mode-tools-1.04.init @@ -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.04.init,v 1.1 2005/03/22 18:52:40 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 start &> /dev/null + eend $? +} + +stop() { + ebegin "Stopping laptop_mode" + /usr/sbin/laptop_mode stop &> /dev/null && rm -f /var/run/laptop-mode-enabled + eend $? +} |