summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Buchholz <rbu@gentoo.org>2007-10-04 08:43:58 +0000
committerRobert Buchholz <rbu@gentoo.org>2007-10-04 08:43:58 +0000
commit8f76a5b10975c7ca515b703bd2413e19730cc432 (patch)
tree4deca13ce345f160d7d697fb5d883e98de07a351 /app-misc/g15daemon/files
parentfixing digest for x86 (diff)
downloadgentoo-2-8f76a5b10975c7ca515b703bd2413e19730cc432.tar.gz
gentoo-2-8f76a5b10975c7ca515b703bd2413e19730cc432.tar.bz2
gentoo-2-8f76a5b10975c7ca515b703bd2413e19730cc432.zip
New POSIX init script by Peter Alfredsen and Roy Marples (bug #194365)
(Portage version: 2.1.3.9)
Diffstat (limited to 'app-misc/g15daemon/files')
-rw-r--r--app-misc/g15daemon/files/digest-g15daemon-1.2.7-r13
-rw-r--r--app-misc/g15daemon/files/digest-g15daemon-1.9.0-r1 (renamed from app-misc/g15daemon/files/digest-g15daemon-1.9.0)0
-rw-r--r--app-misc/g15daemon/files/g15daemon-1.2.7-r1.initd40
3 files changed, 43 insertions, 0 deletions
diff --git a/app-misc/g15daemon/files/digest-g15daemon-1.2.7-r1 b/app-misc/g15daemon/files/digest-g15daemon-1.2.7-r1
new file mode 100644
index 000000000000..f40663c0ddfd
--- /dev/null
+++ b/app-misc/g15daemon/files/digest-g15daemon-1.2.7-r1
@@ -0,0 +1,3 @@
+MD5 ab84b85dfd6e0819f7a5ed85eb8e2673 g15daemon-1.2.7.tar.bz2 275938
+RMD160 e6490c9b3200c89cf88c574459eef7562a500161 g15daemon-1.2.7.tar.bz2 275938
+SHA256 2f8cfa386c88e72dbb07c7112cbd943dbda4f56dd55d08a01c7bf9efd47d164f g15daemon-1.2.7.tar.bz2 275938
diff --git a/app-misc/g15daemon/files/digest-g15daemon-1.9.0 b/app-misc/g15daemon/files/digest-g15daemon-1.9.0-r1
index 0f5a8a3c5fe8..0f5a8a3c5fe8 100644
--- a/app-misc/g15daemon/files/digest-g15daemon-1.9.0
+++ b/app-misc/g15daemon/files/digest-g15daemon-1.9.0-r1
diff --git a/app-misc/g15daemon/files/g15daemon-1.2.7-r1.initd b/app-misc/g15daemon/files/g15daemon-1.2.7-r1.initd
new file mode 100644
index 000000000000..4ab66102e46b
--- /dev/null
+++ b/app-misc/g15daemon/files/g15daemon-1.2.7-r1.initd
@@ -0,0 +1,40 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/g15daemon/files/g15daemon-1.2.7-r1.initd,v 1.1 2007/10/04 08:43:58 rbu Exp $
+
+# Init script for g15daemon
+
+depend() {
+ after hotplug
+ after usb
+ after modules
+}
+
+start() {
+ ebegin "Starting g15daemon"
+
+ # Does the input device already exist?
+ if [ -e /proc/modules -a ! -e /dev/input/uinput ]; then
+ # We can load modules, but uinput device does not exist
+ einfo "Loading uinput module"
+ /sbin/modprobe uinput > /dev/null 2> /dev/null
+ fi
+
+ local SWITCHKEY=""
+ [ "${CLIENT_SWITCH_L1}" = "yes" ] && SWITCHKEY="--switch"
+ start-stop-daemon --start --background --pidfile /var/run/g15daemon.pid \
+ --exec /usr/sbin/g15daemon -- ${SWITCHKEY}
+ eend $? "Failed to start g15daemon."
+}
+
+stop() {
+ ebegin "Stopping g15daemon"
+ local KILLOPT="-k"
+ if [ $BACKLIGHT_OFF = "yes" ]; then
+ KILLOPT="-K"
+ fi
+ /usr/sbin/g15daemon ${KILLOPT} >/dev/null 2> /dev/null&&wait `cat /var/run/g15daemon.pid` \
+ || start-stop-daemon --signal SIGKILL --stop --quiet --pidfile /var/run/g15daemon.pid
+ eend $?
+}