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 [ "${NETWORKING}" = "no" ] && exit 0
24 # Check that smb.conf exists.
25 [ -f /etc/samba/smb.conf ] || exit 0
27 # See how we were called.
31 daemon $NICELEVEL smbd -D
33 daemon $NICELEVEL nmbd -D
34 touch /var/lock/subsys/smb
37 show Shutting down smbd
39 show Shutting down nmbd
41 rm -f /var/lock/subsys/smb
53 echo "Usage: $0 {start|stop|restart|status}"