Blame SOURCES/rfcomm.init

19062e
#!/bin/sh
19062e
19062e
# chkconfig:	- 27 88
19062e
19062e
### BEGIN INIT INFO
19062e
# Required-Start: bluetooth
19062e
# Default-Start: 
19062e
# Short-Description: Bluetooth RFCOMM setup.
19062e
# Description: Bluetooth RFCOMM setup. Sets up serial devices
19062e
# over Bluetooth.
19062e
### END INIT INFO
19062e
19062e
# Source function library.
19062e
. /etc/rc.d/init.d/functions
19062e
19062e
[ -f /etc/sysconfig/network ] && . /etc/sysconfig/network
19062e
19062e
[ "${NETWORKING}" = "yes" ] || exit 0
19062e
19062e
start() 
19062e
{
19062e
        echo -n $"Starting rfcomm: "
19062e
        rfcomm bind all
19062e
	RETVAL=$?
19062e
	echo
19062e
	[ $RETVAL = 0 ] && touch /var/lock/subsys/rfcomm
19062e
        return $RETVAL
19062e
}
19062e
19062e
stop() 
19062e
{
19062e
        echo -n $"Shutting down rfcomm: "
19062e
	rfcomm release all
19062e
	RETVAL=$?
19062e
19062e
	rm -f  /var/lock/subsys/rfcomm
19062e
        echo
19062e
	return $RETVAL
19062e
}
19062e
19062e
# See how we were called.
19062e
case "$1" in
19062e
  start)
19062e
	start
19062e
        ;;
19062e
  stop)
19062e
	stop
19062e
        ;;
19062e
  force-reload|restart|reload)
19062e
	stop
19062e
	start
19062e
	;;
19062e
  try-restart|condrestart)
19062e
	[ -e /var/lock/subsys/rfcomm ] && (stop; start)
19062e
	;;
19062e
  status)
19062e
        RETVAL=1
19062e
  	[ -e /var/lock/subsys/rfcomm ] && RETVAL=0
19062e
	;;
19062e
  *)
19062e
        echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
19062e
        exit 3
19062e
esac
19062e
19062e
exit $RETVAL