|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /proc/21572/root/etc/rc3.d/ |
Upload File : |
#!/bin/sh
#
# irda This shell script takes care of starting and stopping
# IrDA support
#
# chkconfig: - 45 24
# description: IrDA(TM) (Infrared Data Association) is an industry standard \
# for wireless, infrared communication between devices. IrDA speeds range \
# from 9600 bps to 4 Mbps, and IrDA can be used by many modern devices \
# including laptops, LAN adapters, PDAs, printers, and mobile phones.
#
# Source function library.
. /etc/rc.d/init.d/functions
# Source IrDA networking configuration.
. /etc/sysconfig/irda
prog="IrDA"
start() {
# Attach irda device
echo -n $"Starting $prog: "
/sbin/modprobe ircomm-tty 2>/dev/null
/sbin/modprobe irtty-sir 2>/dev/null
/sbin/modprobe irnet 2>/dev/null
daemon /usr/sbin/irattach ${DEVICE} ${ARGS}
[ -f /var/run/irattach.pid ] && success $"irattach startup" || failure $"irattach startup"
echo
}
stop() {
# Stop service.
echo -n $"Shutting down $prog: "
[ -f /var/run/irattach.pid ] && killproc irattach || success $"irattach shutdown"
echo
}
# Check that irda is up.
[ ${IRDA} = "no" ] && exit 0
[ -f /usr/sbin/irattach ] || exit 0
ARGS=
if [ -n "$DONGLE" ]; then
ARGS="$ARGS -d $DONGLE"
fi
if [ "$DISCOVERY" = "yes" ];then
ARGS="$ARGS -s"
fi
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status irattach
;;
restart|reload)
stop
start
;;
condrestart)
[ -e /var/run/irdattach.pid ] && (stop; start)
;;
*)
echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"
exit 1
esac
exit 0