[OGo-Bugs][Bug 1984] Startup scripts in Redhat/CentOS packages create empty PID files
bugs@opengroupware.org
bugs@opengroupware.org
Wed, 11 Jun 2008 15:04:33 +0200 (CEST)
Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug
report.
http://bugzilla.opengroupware.org/bugzilla/show_bug.cgi?id=1984
------- Additional Comments From samuli.seppanen@tietoteema.fi 2008-06-11 14:58 -------
>From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; it; rv:1.9) Gecko/2008060309
Firefox/3.0
Description of problem:
Redhat/CentOS startup scripts create empty PID files. This makes monitoring OGo
processes (WebUI, Zidestore, XMLRPCd) harder with monit. Patches to startup
scripts are included.
Version-Release number of selected component (if applicable):
ogo-*-1.1.7-r1987
How reproducible:
Always
Steps to Reproduce:
1. /etc/init.d/ogo-something
2. cat /var/run/ogo-something-1.5.pid
3.
Actual Results: PID-file is empty
Expected Results: PID file should contain processes PID number(s)
Additional info:
The same problem is in all of the OGo startup scripts in CentOS. The problem is
caused by the line with "echo $!":
echo $! > ${PID_FILE}
PID=`/sbin/pidof "${BIN}"`
It can be fixed rather easily if do this instead:
PID=`/sbin/pidof "${BIN}"`
echo ${PID} > ${PID_FILE}
Now PID-file is correct:
# cat /var/run/ogo-zidestore-1.5.pid
23980 23979
I tested this fix on ogo-zidestore and ogo-xmlrpcd. PID-files are created and
removed like they should. Starting and stopping the OGo daemons works as
expected. I wasn't able to test ogo-webui right now because it's in production
use, but it suffers from the same problem and the code is identical so I'll
attach a patch for it too.
There was one similar bug report a while back (in 2005 or 2006), but it
conserned SUSE, not Redhat/CentOS.
------- Additional Comments From samuli.seppanen@tietoteema.fi 2008-06-11 15:04 -------
Created an attachment (id=644)
--> (http://bugzilla.opengroupware.org/bugzilla/attachment.cgi?id=644&action=view)
Patch for ogo-webui startup script
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.