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 | 3bccaf82df873099c294ff6e16f5fad2eb06c611 (patch) | |
tree | 42e47373cb4e7aa1108f900ae8e24d0c3683bae9 /app-laptop/laptop-mode-tools/files | |
parent | spelling fix (diff) | |
download | gentoo-2-3bccaf82df873099c294ff6e16f5fad2eb06c611.tar.gz gentoo-2-3bccaf82df873099c294ff6e16f5fad2eb06c611.tar.bz2 gentoo-2-3bccaf82df873099c294ff6e16f5fad2eb06c611.zip |
Initial import, fixes bug #45593. Thank you to all who commented on the bug report.
(Portage version: 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 $? +} |