Pārlūkot izejas kodu

HPCC-11257 update hpcc-init stop return 0 instead 3

Set return code to 0 instead of 3 in following scenarios:
1) the process is already stopped.
2) the process is stopped after start-stop-daemon -K call and before
   or during the first check_status call.
Xiaoming Wang 11 gadi atpakaļ
vecāks
revīzija
f720cda85a
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      initfiles/bash/etc/init.d/hpcc_common.in

+ 2 - 2
initfiles/bash/etc/init.d/hpcc_common.in

@@ -538,7 +538,7 @@ stop_component() {
           removePid ${PIDPATH}
           unlock ${LOCKPATH}
        fi
-       return ${RCSTOP}
+       return 0
     fi
     
     stopcmd="${START_STOP_DAEMON} -K -p ${PIDPATH} >> tmp.txt 2>&1"
@@ -579,7 +579,7 @@ stop_component() {
         removePid ${PIDPATH}
         unlock ${LOCKPATH}
         log_success_msg  
-        RCSTOP=3
+        RCSTOP=0
     fi
     return ${RCSTOP}
 }