diff options
author | Gerald Carter <jerry@samba.org> | 2002-11-18 15:59:04 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2002-11-18 15:59:04 +0000 |
commit | e9752bf4ca99848aaf66bbf1dc5900450d4fc647 (patch) | |
tree | e1a46c21ce3cb3dd70058cee532e499c6f88ac9c /packaging/RedHat/smb.init | |
parent | a40359b6e942353c1d4177ddebdc6ea0fd6d8fd5 (diff) | |
download | samba-e9752bf4ca99848aaf66bbf1dc5900450d4fc647.tar.gz samba-e9752bf4ca99848aaf66bbf1dc5900450d4fc647.tar.bz2 samba-e9752bf4ca99848aaf66bbf1dc5900450d4fc647.zip |
sync packaging changes with SAMBA_3_0
(This used to be commit 45adf8c0fffe52731cd2da0d461b7292d0f6c817)
Diffstat (limited to 'packaging/RedHat/smb.init')
-rwxr-xr-x | packaging/RedHat/smb.init | 17 |
1 files changed, 9 insertions, 8 deletions
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: " |