Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 194365 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/portage/app-misc/g15daemon/files/g15daemon-1.2.7.initd (-5 / +8 lines)
Lines 13-38 Link Here
13
13
14
start() {
14
start() {
15
	ebegin "Starting g15daemon"
15
	ebegin "Starting g15daemon"
16
16
17
	# Does the input device already exist?
17
	# Does the input device already exist?
18
	if [[ -e /proc/modules && ! -e /dev/input/uinput ]] ; then
18
	if [ -e /proc/modules -a ! -e /dev/input/uinput ]; then
19
		# We can load modules, but uinput device does not exist
19
		# We can load modules, but uinput device does not exist
20
		einfo "Loading uinput module"
20
		einfo "Loading uinput module"
21
		/sbin/modprobe uinput &> /dev/null
21
		/sbin/modprobe uinput > /dev/null 2> /dev/null
22
	fi
22
	fi
23
23
24
	local SWITCHKEY=""
24
	local SWITCHKEY=""
25
	[[ ${CLIENT_SWITCH_L1} = "yes" ]] && SWITCHKEY="--switch"
25
	test $CLIENT_SWITCH_L1 = "yes"&&SWITCHKEY="--switch"
26
	#[[ ${CLIENT_SWITCH_L1} = "yes" ]] && SWITCHKEY="--switch"
26
	start-stop-daemon --start --background --pidfile /var/run/g15daemon.pid \
27
	start-stop-daemon --start --background --pidfile /var/run/g15daemon.pid \
27
		--exec /usr/sbin/g15daemon -- ${SWITCHKEY}
28
		--exec /usr/sbin/g15daemon -- ${SWITCHKEY}
28
	eend $? "Failed to start g15daemon."
29
	eend $? "Failed to start g15daemon."
29
}
30
}
30
31
31
stop() {
32
stop() {
32
	ebegin "Stopping g15daemon"
33
	ebegin "Stopping g15daemon"
33
	local KILLOPT="-k"
34
	local KILLOPT="-k"
34
	[[ ${BACKLIGHT_OFF} = "yes" ]] && KILLOPT="-K"
35
	if [ $BACKLIGHT_OFF = "yes" ]; then
35
	/usr/sbin/g15daemon ${KILLOPT} 2&> /dev/null  \
36
		KILLOPT="-K"
37
	fi
38
	/usr/sbin/g15daemon ${KILLOPT} >/dev/null 2> /dev/null&&wait `cat /var/run/g15daemon.pid`  \
36
		|| start-stop-daemon --stop --quiet --pidfile /var/run/g15daemon.pid
39
		|| start-stop-daemon --stop --quiet --pidfile /var/run/g15daemon.pid
37
	eend $?
40
	eend $?
38
}
41
}

Return to bug 194365