1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-10 12:58:35 +03:00

r16486: fix RedHat init scripts to rely on OS provided killproc() function

This commit is contained in:
Gerald Carter 2006-06-23 14:39:40 +00:00 committed by Gerald (Jerry) Carter
parent 09fb20f4fe
commit 164cdf69f3
3 changed files with 5 additions and 12 deletions

View File

@ -71,14 +71,14 @@ start() {
stop() {
KIND="SMB"
echo -n $"Shutting down $KIND services: "
killproc smbd -TERM
killproc smbd
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f /var/run/smbd.pid
echo
KIND="NMB"
if [ x"$ISNETBIOSDISABLED" != x"Yes" ]; then
echo -n $"Shutting down $KIND services: "
killproc nmbd -TERM
killproc nmbd
RETVAL2=$?
[ $RETVAL2 -eq 0 ] && rm -f /var/run/nmbd.pid
[ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && rm -f /var/lock/subsys/smb

View File

@ -49,7 +49,7 @@ stop() {
echo
KIND="Winbind"
echo -n $"Shutting down $KIND services: "
killproc winbindd -TERM
killproc winbindd
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f /var/run/winbindd.pid && rm -f /var/lock/subsys/winbindd
echo ""

View File

@ -30,15 +30,8 @@ case "$1" in
stop)
echo -n "Shutting down SMB services: "
## 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
killproc smbd
killproc nmbd
rm -f /var/lock/subsys/smb
echo ""
;;