4 # description: Starts and stops the Samba winbind daemon to provide \
5 # user and group information from a domain controller to linux.
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 $CONFIG ] || exit 0
27 CONFIG=/usr/local/samba/lib/smb.conf
28 PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/samba/sbin:/usr/local/samba/bin
33 echo -n "Starting Winbind services: "
35 if [ "`egrep -i '(idmap.*uid|winbind.*uid)' $CONFIG | egrep -v [\#\;]`" ]; then
40 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/winbind || \
45 echo -n "Shutting down Winbind services: "
47 if [ "`egrep -i '(idmap.*uid|winbind.*uid)' $CONFIG | egrep -v [\#\;]`" ]; then
52 [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/winbind
60 export TMPDIR="/var/tmp"
61 echo -n "Checking domain trusts: "
62 killproc winbindd -HUP
88 [ -f /var/lock/subsys/winbindd ] && restart || :
91 echo "Usage: $0 {start|stop|restart|status|condrestart}"