#!/bin/sh # # irmanager This shell script takes care of starting and stopping # irmanger (irda daemon). # # chkconfig: 345 90 10 # description: irmanager is the irda daemon required for irda to work \ # properly. # # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network # Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0 [ -f /usr/sbin/irmanager ] || exit 0 # See how we were called. case "$1" in start) # Start daemons. echo "Setting serial port ttyS2 to irq 10" setserial /dev/ttyS2 irq 10 echo -n "Starting irmanager: " daemon irmanager -d 1 echo ;; stop) # Stop daemons. echo -n "Shutting down irmanager: " killproc irmanager echo echo -n "Shutting down irattach: " killproc irattach echo echo -n "Unloading modules..." rmmod ircomm-tty rmmod ircomm rmmod irtty rmmod irda echo ;; status) status irmanager ;; restart|reload) $0 stop $0 start ;; *) echo "Usage: irda {start|stop|restart|reload|status}" exit 1 esac exit 0