4 # description: Starts and stops the Samba smbd and nmbd daemons \
5 # used to provide SMB network services.
7 # config: /etc/samba/smb.conf
8 # config: /etc/samba/lmhosts
10 export PATH=/bin:/sbin:/usr/bin:/usr/sbin
12 # Source function library.
13 . /etc/rc.d/init.d/functions
15 # Source networking configuration.
16 . /etc/sysconfig/network
18 # Demon specified configuration.
19 . /etc/sysconfig/samba
21 # Check that networking is up.
22 if is_no "${NETWORKING}"; then
27 TMPDIR="/tmp"; export TMPDIR
29 # Check that smb.conf exists.
30 [ -f /etc/samba/smb.conf ] || exit 0
32 # See how we were called.
35 # Check if the service is already running?
36 if [ ! -f /var/lock/subsys/smb ]; then
38 daemon $NICELEVEL smbd -D
40 daemon $NICELEVEL nmbd -D
41 if [ $WINBINDD = "yes" ]; then
43 daemon $NICELEVEL winbindd
46 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/smb
48 msg_Already_Running smb
54 if [ -f /var/lock/subsys/smb ]; then
59 if [ $WINBINDD = "yes" ]; then
63 rm -f /var/lock/subsys/smb >/dev/null 2>&1
81 if [ -f /var/lock/subsys/smb ]; then
90 msg_Usage "$0 {start|stop|restart|reload|status}"