4 # description: Starts and stops the Samba smbd and nmbd daemons \
5 # used to provide SMB network services.
7 # Source function library.
8 if [ -f /etc/init.d/functions ] ; then
9 . /etc/init.d/functions
10 elif [ -f /etc/rc.d/init.d/functions ] ; then
11 . /etc/rc.d/init.d/functions
16 # Source networking configuration.
17 . /etc/sysconfig/network
19 # Check that networking is up.
20 [ ${NETWORKING} = "no" ] && exit 0
22 # Check that smb.conf exists.
23 [ -f /etc/smb.conf ] || exit 0
29 echo -n "Starting SMB services: "
33 echo -n "Starting NMB services: "
37 [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && touch /var/lock/subsys/smb || \
42 echo -n "Shutting down SMB services: "
46 echo -n "Shutting down NMB services: "
49 [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && rm -f /var/lock/subsys/smb
58 echo -n "Reloading smb.conf file: "
86 [ -f /var/lock/subsys/smb ] && restart || :
89 echo "Usage: $0 {start|stop|restart|status|condrestart}"