ALT Linux repositórios
S: | 0.10.1-alt6.1 |
5.0: | 0.8.3-alt1.cvs20080313 |
4.1: | 0.8.3-alt1.cvs20080313 |
4.0: | 0.8.1-alt1 |
3.0: | 0.7.0-alt4 |
Group :: Sistema/Base
RPM: lirc
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
#!/bin/sh
#
# lirc: This is an init script for RedHat distribution.
#
# Author: Denis V. Dmitrienko <denis@null.net>
#
# chkconfig: 345 43 10
# description: lirc is a Linux Infrared Remote Control system.
# Source function library.
. /etc/rc.d/init.d/functions
# Source config.
SourceIfNotEmpty /etc/sysconfig/lircd
[ -z "$OPT" ] && OPT=""
[ -f /usr/sbin/lircd ] || exit 0
[ -f /usr/sbin/lircmd ] || exit 0
LOCKFILE="/var/lock/subsys/lirc"
RETVAL=0
start()
{
echo -n "Starting Infrared Remote Control: "
start_daemon --no-announce -- lircd -p 660 $OPT
RETVAL=$?
start_daemon --lockfile "$LOCKFILE" lircmd
RETVAL2=$?
[ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] || RETVAL=1
return $RETVAL
}
stop()
{
echo -n "Shutting down Infrared Remote Control: "
stop_daemon --no-announce lircmd
RETVAL=$?
stop_daemon --no-announce --lockfile "$LOCKFILE" lircd
RETVAL2=$?
return $RETVAL
}
restart()
{
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status lircd
status lircmd
;;
restart)
restart
;;
condstop)
if [ -e "$LOCKFILE" ]; then
stop
fi
;;
condrestart)
if [ -e "$LOCKFILE" ]; then
restart
fi
;;
*)
echo "Usage: lirc {start|stop|status|restart|condstop|condrestart}"
RETVAL=1
esac
exit $RETVAL