Samba 3 configuration: preset failing tests, remove unused parameters, don't disable...
[tomato.git] / release / src / router / samba3 / packaging / RedHat-9 / smb.init
blob9b45ebabb343912d09900158a3681f20f61a0222
1 #!/bin/sh
3 # chkconfig: 345 81 35
4 # description: Starts and stops the Samba smbd and nmbd daemons \
5 # used to provide SMB network services.
7 # Source function library.
8 . /etc/rc.d/init.d/functions
10 # Source networking configuration.
11 . /etc/sysconfig/network
13 # Check that networking is up.
14 [ ${NETWORKING} = "no" ] && exit 0
16 CONFIG=/etc/samba/smb.conf
18 # Check that smb.conf exists.
19 [ -f $CONFIG ] || exit 0
21 # See how we were called.
22 case "$1" in
23 start)
24 echo -n "Starting SMB services: "
25 daemon smbd -D
26 daemon nmbd -D
27 echo
28 touch /var/lock/subsys/smb
30 stop)
31 echo -n "Shutting down SMB services: "
33 killproc smbd
34 killproc nmbd
35 rm -f /var/lock/subsys/smb
36 echo ""
38 status)
39 status smbd
40 status nmbd
42 restart)
43 echo -n "Restarting SMB services: "
44 $0 stop
45 $0 start
46 echo "done."
49 echo "Usage: smb {start|stop|restart|status}"
50 exit 1
51 esac