Blame SOURCES/pand.init

19062e
#!/bin/sh
19062e
19062e
# chkconfig:	- 26 89
19062e
19062e
### BEGIN INIT INFO
19062e
# Required-Start: bluetooth
19062e
# Default-Start:
19062e
# Short-Description: Bluetooth Personal Area Networking Daemon.
19062e
# Description: Bluetooth Personal Area Networking Daemon. Provides network
19062e
# services 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
[ -r /etc/sysconfig/pand ] && . /etc/sysconfig/pand
19062e
19062e
start() 
19062e
{
19062e
	[ -z "$PANDARGS" ] && exit 6
19062e
        [ -x /etc/bluetooth/pan/system-up ] && /etc/bluetooth/pan/system-up
19062e
19062e
        echo -n $"Starting pand: "
19062e
        daemon /usr/bin/pand $PANDARGS
19062e
	RETVAL=$?
19062e
        echo
19062e
	[ $RETVAL = 0 ] && touch /var/lock/subsys/pand
19062e
	return $RETVAL
19062e
}
19062e
19062e
stop() 
19062e
{
19062e
        echo -n $"Shutting down pand: "
19062e
	/usr/bin/pand -K
19062e
	killproc pand
19062e
	RETVAL=$?
19062e
        [ -x /etc/bluetooth/pan/system-down ] && /etc/bluetooth/pan/system-down
19062e
	rm -f  /var/lock/subsys/pand
19062e
        echo
19062e
	return $RETVAL
19062e
}
19062e
19062e
[ -f /usr/bin/pand ] || exit 0
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/pand ] && (stop; start)
19062e
	;;
19062e
  status)
19062e
  	status pand
19062e
	RETVAL=$?
19062e
	;;
19062e
  *)
19062e
        echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
19062e
        exit 3
19062e
esac
19062e
19062e
exit $RETVAL