1 |
polynomial-c 13/03/01 23:16:50 |
2 |
|
3 |
Added: g15daemon-1.9.5.3.initd |
4 |
Log: |
5 |
Added rewritten init script to fix bug #451966 |
6 |
|
7 |
(Portage version: 2.2.0_alpha163/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 app-misc/g15daemon/files/g15daemon-1.9.5.3.initd |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/g15daemon/files/g15daemon-1.9.5.3.initd?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-misc/g15daemon/files/g15daemon-1.9.5.3.initd?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: g15daemon-1.9.5.3.initd |
16 |
=================================================================== |
17 |
#!/sbin/runscript |
18 |
# Copyright 1999-2013 Gentoo Foundation |
19 |
# Distributed under the terms of the GNU General Public License v2 |
20 |
# $Header: /var/cvsroot/gentoo-x86/app-misc/g15daemon/files/g15daemon-1.9.5.3.initd,v 1.1 2013/03/01 23:16:50 polynomial-c Exp $ |
21 |
|
22 |
# Init script for g15daemon |
23 |
|
24 |
pidfile="/var/run/g15daemon.pid" |
25 |
command="/usr/sbin/g15daemon" |
26 |
command_args="" |
27 |
start_stop_daemon_args="--background --pidfile ${pidfile}" |
28 |
|
29 |
depend() { |
30 |
after hotplug |
31 |
after usb |
32 |
after modules |
33 |
} |
34 |
|
35 |
start_pre() { |
36 |
# Does the input device already exist? |
37 |
if [ -e "/proc/modules" ] ; then |
38 |
if [ ! -e "/dev/input/uinput" ] || [ ! -e "/dev/uinput" ] ; then |
39 |
# We can load modules, but uinput device does not exist |
40 |
einfo "Loading uinput module" |
41 |
/sbin/modprobe uinput > /dev/null 2> /dev/null |
42 |
fi |
43 |
fi |
44 |
|
45 |
local SWITCHKEY="" |
46 |
[ "${CLIENT_SWITCH_L1}" = "yes" ] && command_args="--switch" |
47 |
} |
48 |
|
49 |
stop() { |
50 |
ebegin "Stopping g15daemon" |
51 |
local KILLOPT="-k" |
52 |
if [ $BACKLIGHT_OFF = "yes" ]; then |
53 |
KILLOPT="-K" |
54 |
fi |
55 |
start-stop-daemon -R 5 --exec ${command} -- ${KILLOPT} |
56 |
eend $? |
57 |
} |