Browse Source

Fix bug in logmgmt start check

The start function of the logmgmt init script
checks for a valid pidfile to see if the process is
already running. Unfortunately, the code has a couple
of typos that cause the check to fail if the "start"
is called when the process is already running.

This commit fixes the typos.

Change-Id: I5795d23cc9e41a18b62e35bf3df07817522efe52
Related-Bug: 1827326
Signed-off-by: Don Penney <don.penney@windriver.com>
changes/20/680920/1
Don Penney 2 years ago
parent
commit
6bc6aed3d4
  1. 5
      utilities/logmgmt/scripts/init.d/logmgmt

5
utilities/logmgmt/scripts/init.d/logmgmt

@ -20,8 +20,9 @@ PIDFILE=$RUNDIR/$DESC.pid
start()
{
if [ -e $PIDFILE ]; then
PIDDIR=/prod/$(cat $PIDFILE)
if [ -d ${PIDFILE} ]; then
PID=$(cat $PIDFILE)
PIDDIR=/proc/${PID}
if [ -n "${PID}" -a -d ${PIDDIR} ]; then
echo "$DESC already running."
exit 0
else

Loading…
Cancel
Save