On RHEL < 5, the status function does not accept a -p option. Using it causes 'service puppet status' to produce erroneous output. This was also reported by Aaron Dummer in Red Hat bug #501577.
Signed-off-by: Todd Zullinger <[email protected]> --- conf/redhat/client.init | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/conf/redhat/client.init b/conf/redhat/client.init index 114fb18..bccb45c 100644 --- a/conf/redhat/client.init +++ b/conf/redhat/client.init @@ -62,6 +62,11 @@ restart() { start } +rh_status() { + status | grep -q -- '-p' 2>/dev/null && statusopts="-p $pidfile" + status $statusopts $puppetd +} + genconfig() { echo -n $"Generate configuration puppet: " $puppetd ${PUPPET_OPTS} ${PUPPET_EXTRA_OPTS} --genconfig @@ -84,8 +89,7 @@ case "$1" in [ -f "$pidfile" ] && restart ;; status) - status -p "$pidfile" $puppetd - RETVAL=$? + rh_status ;; once) shift -- 1.6.4 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en -~----------~----~----~----~------~----~------~--~---
