Sophie

Sophie

distrib > Mandriva > 2009.0 > x86_64 > media > main-testing-src > by-pkgid > 64d93c4fd782a6bc85d0d70a321c5259 > files > 16

bluez-utils-3.36-6mdv2009.0.src.rpm

#!/bin/sh
#
# pand:		Bluetooth Personal Area Networking Daemon.
#
# chkconfig:	- 26 59
# description:	Bluetooth Personal Area Networking Daemon. Provides network
#		services over Bluetooth.
#
### BEGIN INIT INFO
# Provides: pand
# Required-Start: $network bluetooth
# Required-Stop: $network bluetooth
# Short-Description: Bluetooth Personal Area Networking Daemon
# Description:	Bluetooth Personal Area Networking Daemon.
#               Provides network services over Bluetooth.
### END INIT INFO

# Source function library.
. /etc/rc.d/init.d/functions

. /etc/sysconfig/network

[ ${NETWORKING} = "no" ] && exit 0

[ -r /etc/sysconfig/pand ] || exit 0

. /etc/sysconfig/pand

[ -z "$PANDARGS" ] && exit 0

start() 
{
        [ -x /etc/bluetooth/pan/system-up ] && /etc/bluetooth/pan/system-up

        echo -n $"Starting pand: "
        daemon /usr/bin/pand $PANDARGS

	touch /var/lock/subsys/pand
        echo
}

stop() 
{
        echo -n $"Shutting down pand: "
	/usr/bin/pand -K
	killproc pand

        [ -x /etc/bluetooth/pan/system-down ] && /etc/bluetooth/pan/system-down
	rm -f  /var/lock/subsys/pand
        echo
}

[ -f /usr/bin/pand ] || exit 0

# See how we were called.
case "$1" in
  start)
	start
        ;;
  stop)
	stop
        ;;
  restart|reload)
	stop
	start
	;;
  condrestart)
	[ -e /var/lock/subsys/pand ] && (stop; start)
	;;
  status)
  	status pand
	;;
  *)
        echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"
        exit 1
esac

exit 0