blob: 92b2d991589b79e4455955fb7d4dbf8162807af9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#!/sbin/runscript
depend() {
after alsasound
after modules
}
checkconfig() {
if [ ! -e /proc/i8k ] ; then
eerror "The i8k driver is not installed"
return 1
fi
}
start() {
checkconfig || return 1
if [ -n "$VOLUME_UP$VOLUME_DOWN$VOLUME_MUTE" ] ; then
ebegin "Starting i8kbuttons"
start-stop-daemon --start --quiet --pidfile /var/run/i8kbuttons.pid \
--make-pidfile --exec /usr/bin/i8kbuttons --background \
-- ${VOLUME_UP:+-u "${VOLUME_UP}"} \
${VOLUME_DOWN:+-d "$VOLUME_DOWN"} \
${VOLUME_MUTE:+-m "$VOLUME_MUTE"} \
${BUTTON_REPEAT:+-r "$BUTTON_REPEAT"}
eend $?
fi
if [ ! -n "$NOMON" ]; then
ebegin "Starting i8kmon"
start-stop-daemon --start --quiet --pidfile /var/run/i8kmon.pid \
--make-pidfile --exec /usr/bin/i8kmon --background \
-- -d ${NOAUTO:+-na} ${TIMEOUT:+-t $TIMEOUT}
eend $?
fi
}
stop() {
if [ -n "$VOLUME_UP$VOLUME_DOWN$VOLUME_MUTE" ] ; then
ebegin "Stopping i8kbuttons"
start-stop-daemon --stop --quiet --pidfile /var/run/i8kbuttons.pid
eend $?
fi
if [ ! -n "$NOMON" ]; then
ebegin "Stopping i8kmon"
start-stop-daemon --stop --quiet --pidfile /var/run/i8kmon.pid
eend $?
fi
}
|