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>
This commit is contained in:
Родитель
0461a0250d
Коммит
e9fbd4c9a2
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче