summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2006-07-19 11:16:26 +0000
committerRoy Marples <uberlord@gentoo.org>2006-07-19 11:16:26 +0000
commit26edaa5f1a52fb1b882d8e2adccb5221a0f636f0 (patch)
tree9fbce72e128cdac202ba13c3323d4df016d049de /app-laptop
parentAdd sys-libs/db-4 dependency, required by session helper (#140993). (diff)
downloadgentoo-2-26edaa5f1a52fb1b882d8e2adccb5221a0f636f0.tar.gz
gentoo-2-26edaa5f1a52fb1b882d8e2adccb5221a0f636f0.tar.bz2
gentoo-2-26edaa5f1a52fb1b882d8e2adccb5221a0f636f0.zip
Fix some potential quoting issues. Init script now checks if we are started before allowing a reload.
(Portage version: 2.1.1_pre3-r1)
Diffstat (limited to 'app-laptop')
-rw-r--r--app-laptop/laptop-mode-tools/ChangeLog7
-rw-r--r--app-laptop/laptop-mode-tools/files/digest-laptop-mode-tools-1.312
-rw-r--r--app-laptop/laptop-mode-tools/files/laptop_mode.init42
-rw-r--r--app-laptop/laptop-mode-tools/laptop-mode-tools-1.31.ebuild8
-rw-r--r--app-laptop/laptop-mode-tools/metadata.xml4
5 files changed, 56 insertions, 7 deletions
diff --git a/app-laptop/laptop-mode-tools/ChangeLog b/app-laptop/laptop-mode-tools/ChangeLog
index a791027a7d72..bb44656b7e48 100644
--- a/app-laptop/laptop-mode-tools/ChangeLog
+++ b/app-laptop/laptop-mode-tools/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for app-laptop/laptop-mode-tools
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-laptop/laptop-mode-tools/ChangeLog,v 1.31 2006/05/28 12:08:22 brix Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-laptop/laptop-mode-tools/ChangeLog,v 1.32 2006/07/19 11:16:26 uberlord Exp $
+
+ 19 Jul 2006; Roy Marples <uberlord@gentoo.org> +files/laptop_mode.init,
+ metadata.xml, laptop-mode-tools-1.31.ebuild:
+ Fix some potential quoting issues.
+ Init script now checks if we are started before allowing a reload.
28 May 2006; Henrik Brix Andersen <brix@gentoo.org>
-files/laptop-mode-tools-1.11-cpu-governor.patch,
diff --git a/app-laptop/laptop-mode-tools/files/digest-laptop-mode-tools-1.31 b/app-laptop/laptop-mode-tools/files/digest-laptop-mode-tools-1.31
index f041c68ad7fa..1ba9b9650669 100644
--- a/app-laptop/laptop-mode-tools/files/digest-laptop-mode-tools-1.31
+++ b/app-laptop/laptop-mode-tools/files/digest-laptop-mode-tools-1.31
@@ -1 +1,3 @@
MD5 a332179ae046292b232234eb444b2122 laptop-mode-tools_1.31.tar.gz 86554
+RMD160 042b15337a365c6efd1d60ea74c4412fed7949df laptop-mode-tools_1.31.tar.gz 86554
+SHA256 cc2475a237c6d1b95667d464ebece1fbf5a518262fc9a74363ef820ba168d29e laptop-mode-tools_1.31.tar.gz 86554
diff --git a/app-laptop/laptop-mode-tools/files/laptop_mode.init b/app-laptop/laptop-mode-tools/files/laptop_mode.init
new file mode 100644
index 000000000000..d02cdcc2e3af
--- /dev/null
+++ b/app-laptop/laptop-mode-tools/files/laptop_mode.init
@@ -0,0 +1,42 @@
+#!/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.init,v 1.1 2006/07/19 11:16:26 uberlord 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() {
+ if ! service_started "${SVCNAME}" ; then
+ eerror "${SVCNAME} has not yet been started"
+ return 1
+ fi
+
+ ebegin "Reloading laptop_mode"
+ /usr/sbin/laptop_mode auto init force >/dev/null
+ eend $?
+}
+
+# vim: set ts=4 :
diff --git a/app-laptop/laptop-mode-tools/laptop-mode-tools-1.31.ebuild b/app-laptop/laptop-mode-tools/laptop-mode-tools-1.31.ebuild
index d50e8627e189..4a260d3bacbb 100644
--- a/app-laptop/laptop-mode-tools/laptop-mode-tools-1.31.ebuild
+++ b/app-laptop/laptop-mode-tools/laptop-mode-tools-1.31.ebuild
@@ -1,10 +1,10 @@
# 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/laptop-mode-tools-1.31.ebuild,v 1.2 2006/05/26 12:10:59 brix Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-laptop/laptop-mode-tools/laptop-mode-tools-1.31.ebuild,v 1.3 2006/07/19 11:16:26 uberlord Exp $
inherit fixheadtails linux-info
-MY_P=${PN}_${PV}
+MY_P="${PN}_${PV}"
DESCRIPTION="Linux kernel laptop_mode user-space utilities"
HOMEPAGE="http://www.xs4all.nl/~bsamwel/laptop_mode/tools/"
@@ -38,7 +38,7 @@ pkg_setup() {
src_unpack() {
unpack ${A}
- ht_fix_file ${S}/usr/sbin/lm-profiler
+ ht_fix_file "${S}"/usr/sbin/lm-profiler
}
src_install() {
@@ -50,7 +50,7 @@ src_install() {
doins etc/laptop-mode/laptop-mode.conf
doins etc/laptop-mode/lm-profiler.conf
- newinitd ${FILESDIR}/${P}-init.d laptop_mode
+ newinitd "${FILESDIR}"/laptop_mode.init laptop_mode
keepdir /etc/laptop-mode/batt-start
keepdir /etc/laptop-mode/batt-stop
diff --git a/app-laptop/laptop-mode-tools/metadata.xml b/app-laptop/laptop-mode-tools/metadata.xml
index cfbdff13bd61..8cc674ef58f5 100644
--- a/app-laptop/laptop-mode-tools/metadata.xml
+++ b/app-laptop/laptop-mode-tools/metadata.xml
@@ -3,7 +3,7 @@
<pkgmetadata>
<herd>mobile</herd>
<maintainer>
- <email>brix@gentoo.org</email>
- <name>Henrik Brix Andersen</name>
+ <email>uberlord@gentoo.org</email>
+ <name>Roy Marples</name>
</maintainer>
</pkgmetadata>