Sophie

Sophie

distrib > Mandriva > 2006.0 > i586 > media > main-src > by-pkgid > 4e6ba2b876b513d7384f4dfd134a07e0 > files > 9

bluez-utils-2.19-7mdk.src.rpm

#!/bin/sh
#
# dund:		Bluetooth Dial-Up-Networking Daemon.
#
# chkconfig:	- 26 59
# description:	Bluetooth Dial-Up-Networking Daemon. Provides PPP over RFCOMM
#		services.
#

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

. /etc/sysconfig/network

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

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

. /etc/sysconfig/dund

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

start() 
{
        echo -n $"Starting dund: "
        daemon /usr/bin/dund $DUNDARGS

	touch /var/lock/subsys/dund
        echo
}

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

	rm -f  /var/lock/subsys/dund
        echo
}

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

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

exit 0