diff options
author | Gerald Carter <jerry@samba.org> | 2002-10-21 15:24:16 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2002-10-21 15:24:16 +0000 |
commit | e275d14da3de27ab02fce061c44265c2ecefa6ea (patch) | |
tree | 01eb68d80c324e1d7bb6534f5f9f56da1ac96fa1 /packaging/RedHat/smb.init | |
parent | 43b0404154cd1fc9aeff9240743bd334b5918c41 (diff) | |
download | samba-e275d14da3de27ab02fce061c44265c2ecefa6ea.tar.gz samba-e275d14da3de27ab02fce061c44265c2ecefa6ea.tar.xz samba-e275d14da3de27ab02fce061c44265c2ecefa6ea.zip |
updating from SAMBA_2_2
(This used to be commit f40a8baacb79f28834b4186f386e192651596ce4)
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 5419b2b9c6e..f50da2c6b2a 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: " |