Quoting Christian Perrier ([EMAIL PROTECTED]): > tags 454112 patch > thanks > > As correctly stated in that bug report, winbindd doesn't clean out its > PID file when stopped. > > Actually, neither nmbd nor smbd do....but we tricked the removal in > the init script. > > As a consequence, I propose the attached patch as a fix to out > winbind.init script.
Hmmm, *with* the patch will actually be better..:-) Thanks for pointing this, Eloy...
--- winbind.init.old 2008-04-14 16:44:33.982331802 +0200 +++ winbind.init 2008-04-14 17:29:19.314331342 +0200 @@ -16,6 +16,7 @@ DAEMON=/usr/sbin/winbindd PIDDIR=/var/run/samba +WINBINDDPID=$PIDDIR/winbindd.pid # clear conflicting settings from the environment unset TMPDIR @@ -38,9 +39,20 @@ ;; stop) - log_daemon_msg "Stopping the Winbind daemon" "winbind" - start-stop-daemon --stop --quiet --oknodo --exec $DAEMON + log_daemon_msg "Stopping the Winbind daemon" + log_progress_msg "winbindd" + + start-stop-daemon --stop --quiet --pidfile $WINBINDDPID log_end_msg $? + + # Wait a little and remove stale PID file + sleep 1 + if [ -f $WINBINDDPID ] && ! ps h `cat $WINBINDDPID` > /dev/null + then + # Stale PID file (winbindd was succesfully stopped), + # remove it (should be removed by winbindd itself) + rm -f $WINBINDDPID + fi ;; restart|force-reload)
signature.asc
Description: Digital signature