summaryrefslogtreecommitdiffstats
path: root/conf
diff options
context:
space:
mode:
authorTodd Zullinger <tmz@pobox.com>2009-08-06 12:34:56 -0400
committerJames Turnbull <james@lovedthanlost.net>2009-08-13 08:20:42 +1000
commite9fbd4c9a21f1030f8fef1cd561fc3951399ad31 (patch)
tree9b5f56baec9e24db6cbcda5c5468d7a837d9af28 /conf
parent0461a0250dd8641523e27a22901988564fe94aae (diff)
downloadpuppet-e9fbd4c9a21f1030f8fef1cd561fc3951399ad31.tar.gz
puppet-e9fbd4c9a21f1030f8fef1cd561fc3951399ad31.tar.xz
puppet-e9fbd4c9a21f1030f8fef1cd561fc3951399ad31.zip
conf/redhat/client.init: Fix #2123, status options on older RHEL
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 <tmz@pobox.com>
Diffstat (limited to 'conf')
-rw-r--r--conf/redhat/client.init8
1 files changed, 6 insertions, 2 deletions
diff --git a/conf/redhat/client.init b/conf/redhat/client.init
index 114fb1821..bccb45cb1 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