diff options
author | cvs2svn Import User <samba-bugs@samba.org> | 2002-10-31 04:17:30 +0000 |
---|---|---|
committer | cvs2svn Import User <samba-bugs@samba.org> | 2002-10-31 04:17:30 +0000 |
commit | da560b01ba713650271486e6b1a6f0c4fb114c64 (patch) | |
tree | 0feecee4e7d7393e139281c2094289566d78f79b /packaging/Mandrake/winbind.init | |
parent | 3b3c7914e2cd79ee5c6e76af14e386a590aed78e (diff) | |
parent | 0af30d452d1fe7f975a8ffaabfd946bb9801e4ce (diff) | |
download | samba-da560b01ba713650271486e6b1a6f0c4fb114c64.tar.gz samba-da560b01ba713650271486e6b1a6f0c4fb114c64.tar.bz2 samba-da560b01ba713650271486e6b1a6f0c4fb114c64.zip |
This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to be commit f1acef4a1cc3ce99a765a2534a50fbd41f6e2e62)
Diffstat (limited to 'packaging/Mandrake/winbind.init')
-rw-r--r-- | packaging/Mandrake/winbind.init | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/packaging/Mandrake/winbind.init b/packaging/Mandrake/winbind.init new file mode 100644 index 0000000000..13ddb392d7 --- /dev/null +++ b/packaging/Mandrake/winbind.init @@ -0,0 +1,93 @@ +#!/bin/sh +# +# chkconfig: 345 81 45 +# description: Starts and stops the Samba winbind daemon to provide \ +# user and group information from a domain controller to linux. + +# Source function library. +if [ -f /etc/init.d/functions ] ; then + . /etc/init.d/functions +elif [ -f /etc/rc.d/init.d/functions ] ; then + . /etc/rc.d/init.d/functions +else + exit 0 +fi + +# Source networking configuration. +. /etc/sysconfig/network + +# Check that networking is up. +[ ${NETWORKING} = "no" ] && exit 0 + +# Check that smb.conf exists. +[ -f /etc/samba/smb.conf ] || exit 0 + +RETVAL=0 + + +start() { + echo -n "Starting Winbind services: " + RETVAL=1 + if [ "`grep -i 'winbind uid' /etc/samba/smb.conf | egrep -v [\#\;]`" ]; then + daemon winbindd + RETVAL=$? + else + echo "Winbind is not configured in /etc/samba/smb.conf, not starting" + fi + echo + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/winbind || \ + RETVAL=1 + return $RETVAL +} +stop() { + echo -n "Shutting down Winbind services: " + RETVAL=1 + if [ "`grep -i 'winbind uid' /etc/samba/smb.conf | egrep -v [\#\;]`" ]; then + killproc winbindd + RETVAL=$? + fi + echo + [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/winbind + return $RETVAL +} +restart() { + stop + start +} +reload() { + export TMPDIR="/var/tmp" + echo -n "Checking domain trusts: " + killproc winbindd -HUP + RETVAL=$? + echo + return $RETVAL +} +mdkstatus() { + status winbindd +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + reload) + reload + ;; + status) + mdkstatus + ;; + condrestart) + [ -f /var/lock/subsys/winbind ] && restart || : + ;; + *) + echo "Usage: $0 {start|stop|restart|status|condrestart}" + exit 1 +esac + +exit $? |