You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-laptop/i8kutils/files/i8k.init-r1

51 lines
1.2 KiB

#!/sbin/openrc-run
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 -b --quiet \
--pidfile /var/run/i8kmon.pid \
--make-pidfile \
--exec /usr/bin/i8kmon --background \
--name "tclsh /usr/bin/i8kmon" \
-- -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
}