From e275d14da3de27ab02fce061c44265c2ecefa6ea Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 21 Oct 2002 15:24:16 +0000 Subject: updating from SAMBA_2_2 (This used to be commit f40a8baacb79f28834b4186f386e192651596ce4) --- packaging/RedHat/smb.init | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'packaging/RedHat/smb.init') diff --git a/packaging/RedHat/smb.init b/packaging/RedHat/smb.init index 5419b2b9c6..f50da2c6b2 100755 --- a/packaging/RedHat/smb.init +++ b/packaging/RedHat/smb.init @@ -24,26 +24,27 @@ case "$1" in echo -n "Starting SMB services: " daemon smbd -D daemon nmbd -D - if [ "`grep -i 'winbind uid' /etc/samba/smb.conf | egrep -v [\#\;]`" ]; then - daemon winbindd - fi echo touch /var/lock/subsys/smb ;; stop) echo -n "Shutting down SMB services: " - killproc smbd -TERM + + ## we have to get all the smbd process here instead of just the + ## main parent (i.e. killproc) because it can take a long time + ## for an individual process to process a TERM signal + smbdpids=`ps guax | grep smbd | grep -v grep | awk '{print $2}'` + for pid in $smbdpids; do + kill -TERM $pid + done + ## nmbd is ok to kill using killproc() killproc nmbd -TERM - if [ "`ps -ef | grep winbind | grep -v grep`" ]; then - killproc winbindd - fi rm -f /var/lock/subsys/smb echo "" ;; status) status smbd status nmbd - status winbindd ;; restart) echo -n "Restarting SMB services: " -- cgit