Here is a patch to have /etc/init.d/pcp stop return early when there is no
pmcd running
Nathan has already reviewed, but will consider comments for future
incorporation
--- a/mgmt/pcp/src/pmcd/rc_pcp 2007-07-12 10:49:42.000000000 +1000
+++ b/mgmt/pcp/src/pmcd/rc_pcp 2007-07-12 10:47:28.050587091 +1000
@@ -372,6 +372,16 @@
_shutdown()
{
+ # Is pmcd running?
+ #
+ _get_pids_by_name pmcd >$tmp.tmp
+ if [ ! -s $tmp.tmp ]
+ then
+ echo "$prog: PMCD not running"
+ rm -f $PCP_RUN_DIR/pmcd.pid
+ return 0
+ fi
+
# Send pmcd a SIGTERM, which is noted as a pending shutdown.
# When finished the currently active request, pmcd will close any
# connections, wait for any agents, and then exit.
Dr.Michael("Kimba")Newton kimbrr@xxxxxxx
|