Nathan has previously pointed out that if you install the 2.7.1
over an existing installation (eg rpm -U), the new /etc/init.d/pcp
cannot stop a pre-existing instance of pmcd. This was an oversight with
the pidfile change. While Nathan proposed just adding a fallback to
killall for this case, this was a problem for us as we have a build system
(based on SuSE's) for building in a chroot, and the killall means removing
the rpm from the chroot stops pcp for the whole machine. Although it would
be preferable to uninstall --noscripts, getting this change through SuSE
could take time, so for now, this patch assumes that if there is a pmcd,
but no pidfile or log file, we're in a chroot. In addition, there is now
a check that the pid in the pidfile matches that found for pmcd.
Patch to allow upgraded pcp to stop old pmcd
Nathan has previously pointed out that if you install the 2.7.1
over an existing installation (eg rpm -U), the new /etc/init.d/pcp
cannot stop a pre-existing instance of pmcd. This was an oversight with
the pidfile change. While Nathan proposed just adding a fallback to
killall for this case, this was a problem for us as we have a build system
(based on SuSE's) for building in a chroot, and the killall means removing
the rpm from the chroot stops pcp for the whole machine. Although it would
be preferable to uninstall --noscripts, getting this change through SuSE
could take time, so for now, this patch assumes that if there is a pmcd,
but no pidfile or log file, we're in a chroot. In addition, there is now
a check that the pid in the pidfile matches that found for pmcd.