]> git.pld-linux.org Git - packages/bluez.git/blame - dund.init
- updated to 4.95
[packages/bluez.git] / dund.init
CommitLineData
829382b7
AM
1#!/bin/sh
2#
3# dund Bluetooth Dial-Up-Networking Daemon
4#
5# chkconfig: 345 26 89
6#
7# description: Bluetooth Dial-Up-Networking Daemon. Provides PPP over RFCOMM services.
8#
9# $Id$
10
11
12# Source function library
13. /etc/rc.d/init.d/functions
14
15[ -f /etc/sysconfig/bluetooth ] && . /etc/sysconfig/bluetooth
16
17is_no "${NETWORKING}" && exit 0
18
19start() {
20 # Check if the service is already running?
21 if [ ! -f /var/lock/subsys/dund ]; then
22 msg_starting dund
23 daemon /usr/bin/dund ${DUND_OPTIONS}
24 RETVAL=$?
25 touch /var/lock/subsys/dund
26 else
27 msg_already_running dund
28 fi
29}
30
31stop() {
32 if [ -f /var/lock/subsys/dund ]; then
33 msg_stopping dund
34 killproc /usr/bin/dund
35 rm -f /var/lock/subsys/dund
36 else
37 msg_not_running dund
38 fi
39}
40
41condrestart() {
42 if [ -f /var/lock/subsys/dund ]; then
43 stop
44 start
45 else
46 msg_not_running dund
47 RETVAL=$1
48 fi
49}
50
51RETVAL=0
52# See how we were called.
53case "$1" in
54 start)
55 start
56 ;;
57 stop)
58 stop
59 ;;
60 restart|reload|force-reload)
61 stop
62 start
63 ;;
64 try-restart)
65 condrestart 0
66 ;;
67 status)
68 if [ -f /var/lock/subsys/dund ]; then
b5a4e9a8 69 nls "dund is running"
829382b7
AM
70 exit 0
71 else
b5a4e9a8
TP
72 msg_not_running dund
73 exit 3
829382b7
AM
74 fi
75 ;;
76 *)
77 msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status}"
78 exit 3
79esac
80
81exit $RETVAL
This page took 0.05997 seconds and 4 git commands to generate.