#!/bin/sh # # pand Bluetooth Personal Area Networking Daemon # # chkconfig: 345 26 89 # # description: Bluetooth Personal Area Networking Daemon. Provides network services over Bluetooth. # # $Id$ # Source function library . /etc/rc.d/init.d/functions . /etc/sysconfig/network [ -f /etc/sysconfig/bluetooth ] && . /etc/sysconfig/bluetooth is_no "${NETWORKING}" && exit 0 start() { # Check if the service is already running? if [ ! -f /var/lock/subsys/pand ]; then msg_starting pand daemon /usr/bin/pand ${PAND_OPTIONS} RETVAL=$? touch /var/lock/subsys/pand else msg_already_running pand fi } stop() { if [ -f /var/lock/subsys/pand ]; then msg_stopping pand killproc /usr/bin/pand rm -f /var/lock/subsys/pand else msg_not_running pand fi } condrestart() { if [ -f /var/lock/subsys/pand ]; then stop start else msg_not_running pand RETVAL=$1 fi } RETVAL=0 # See how we were called. case "$1" in start) start ;; stop) stop ;; restart|reload|force-reload) stop start ;; try-restart) condrestart 0 ;; status) status pand if [ -f /var/lock/subsys/pand ]; then exit 0 else exit 1 fi ;; *) msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}" exit 3 esac exit $RETVAL