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
28 # Check that smb.conf exists.
29 [ -f /etc/samba/smb.conf ] || exit 0
31 # See how we were called.
34 # Check if the service is already running?
35 if [ ! -f /var/lock/subsys/smb ]; then
37 daemon $NICELEVEL smbd -D
39 daemon $NICELEVEL nmbd -D
41 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/smb
43 msg_Already_Running smb
49 if [ -f /var/lock/subsys/smb ]; then
54 rm -f /var/lock/subsys/smb >/dev/null 2>&1
71 if [ -f /var/lock/subsys/smb ]; then
80 msg_Usage "$0 {start|stop|restart|reload|status}"