r16486: fix RedHat init scripts to rely on OS provided killproc() function
authorGerald Carter <jerry@samba.org>
Fri, 23 Jun 2006 14:39:40 +0000 (14:39 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:18:57 +0000 (11:18 -0500)
(This used to be commit 164cdf69f395236ffef9ecc202543d53b5eda2da)

packaging/RHEL/setup/smb.init
packaging/RHEL/setup/winbind.init
packaging/RedHat-9/smb.init

index 30d7d403dd935b914a5803bb98d7f645fc6968fc..af85b2c079a6ff00caad691bc86bc017bb30d0d8 100644 (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 
index e778e61e9cf59707605c23e38741101828862bcf..a99038f9c71599fc74db298b5a12195d9cd56688 100644 (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 ""
index 79f4f322d03aa348eeb2cfa0d2ac1237b63b880b..9b45ebabb343912d09900158a3681f20f61a0222 100755 (executable)
@@ -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 ""
        ;;