Signed-off-by: Todd Zullinger <t...@pobox.com>
---
conf/redhat/client.init | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/conf/redhat/client.init b/conf/redhat/client.init
index 34c99aa..a6109c4 100644
--- a/conf/redhat/client.init
+++ b/conf/redhat/client.init
@@ -84,7 +84,10 @@ case "$1" in
[ -f "$pidfile" ] && restart
;;
status)
- status -p "$pidfile" $puppetd
+ if status | grep -q -- '-p' 2>/dev/null; then
+ statusopts="-p '$pidfile'"
+ fi
+ status $statusopts $puppetd
RETVAL=$?
;;
once)
--
1.6.3.1
--
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If everything seems to be going well, you have obviously overlooked
something.
Instead of doing this at runtime, couldn't we just patch client.init for
RHEL 4 ?
David
Sure, if that's preferable, it's not a problem.
After I looked at the init scripts, I ran across another Red Hat bug
(#480600¹). I spent some time and updated the init scripts to add LSB
headers, the try-restart action, and exit code usage. Perhaps it's
better to hold off on this one and consider that slightly larger
change? If that sounds reasonable, I'll send an updated 2/2.
¹ https://bugzilla.redhat.com/480600
--
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Never argue with an idiot. First, they drag you down to their level,
then beat you with experience.
-- Ben Adams
Yes, I think a patch that addresses that bz would be very good -
thinking some more about the 'status -p' thing, maybe the cleanest
solution is to just hide the mechanics of calling status in a function
in the init script; that would avoid a RHEL4-specific patch, and still
keep the initscript pretty readable.
David