Technology - Shuttle PC - Install Infrared device

/etc/init.d/irda

pointed to by /etc/init.d/rc5.d/S12irda and /etc/init.d/rc5.d/K11irda

 

#!/bin/sh
# Copyright (c) 2002 SuSE Linux AG, Nuernberg, Germany.
#
# Author: Christian Zoz <zoz@suse.de>
#
# chkconfig: 2345 45 96
#
# /etc/init.d/irda
#
# and it's symbolic link
#
# /usr/sbin/rcirda
#
### BEGIN INIT INFO
# Provides: irda
# Required-Start: $remote_fs $syslog
# X-UnitedLinux-Should-Start: setserial
# Required-Stop: $remote_fs $syslog
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Description: attaches /dev/ircomm to the IrDA port and starts detection
### END INIT INFO

. /etc/rc.status
. /etc/sysconfig/irda

# Shell functions sourced from /etc/rc.status:
# rc_check check and set local and overall rc status
# rc_status check and set local and overall rc status
# rc_status -v ditto but be verbose in local rc status
# rc_status -v -r ditto and clear the local rc status
# rc_failed set local and overall rc status to failed
# rc_reset clear local rc status (overall remains)
# rc_exit exit appropriate to overall rc status

# First reset status of this service
rc_reset
case "$1" in
start)
echo -n "Starting service IrDA"
modprobe ircomm-tty
# Set the maximum baud rate if requested
if [ -n "$IRDA_MAX_BAUD_RATE" -a "$IRDA_MAX_BAUD_RATE" -ne "0" ] ; then
echo $IRDA_MAX_BAUD_RATE >/proc/sys/net/irda/max_baud_rate
fi
## Start daemon with startproc(8). If this fails
## the echo return value is set appropriate.
startproc /usr/sbin/irattach ${IRDA_PORT} -s >/dev/null
# Remember status and be verbose
rc_status -v
;;
stop)
echo -n "Shutting down service IrDA"
## Stop daemon with killproc(8) and if this fails
## set echo the echo return value.
killproc -TERM /usr/sbin/irattach
# Remember status and be verbose
rc_status -v
;;
try-restart)
$0 status >/dev/null && $0 restart
;;
restart|force-reload)
## If first returns OK call the second, if first or
## second command fails, set echo return value.
$0 stop
$0 start
# Remember status and be quiet
rc_status
;;
reload)
;;
status)
echo -n "Checking for service IrDA: "
## Check status with checkproc(8), if process is running
## checkproc will return with exit status 0.
checkproc /usr/sbin/irattach
# Remember status and be verbose
rc_status -v
;;
# probe)
# ## Optional: Probe for the necessity of a reload,
# ## give out the argument which is required for a reload.
# #test /etc/foo.conf -nt /var/run/foo.pid && echo reload
# ;;
*)
echo "Usage: $0 {start|stop|status|[try-]restart|[force-]reload}"
exit 1
;;
esac
rc_exit


metadata block
see also:

 

Correspondence about this page

Book Shop - Further reading.

Where I can, I have put links to Amazon for books that are relevant to the subject, click on the appropriate country flag to get more details of the book or to buy it from them.

cover Build Your Own High-performance Gamers' Mod PC (Build Your Own S.).

Commercial Software Shop

Where I can, I have put links to Amazon for commercial software, not directly related to the software project, but related to the subject being discussed, click on the appropriate country flag to get more details of the software or to buy it from them.

 

This site may have errors. Don't use for critical systems.

Copyright (c) 1998-2023 Martin John Baker - All rights reserved - privacy policy.