From 4b4e9a058f5e591acb5b39df5113beb99258d7ef Mon Sep 17 00:00:00 2001 From: Thomas Oulevey Date: Thu, 23 Aug 2012 11:50:50 +0200 Subject: init.d: Fix init.d on Redhat, so it does not always return 0. * Installing gluster with puppet, it gives an error if service "hasstatus => true" is used. * Introduced a $RETVAL variable set to previous command return value. Change-Id: I186ec59f892f04f25c06478315ca85183cb6232a BUG: 836007 Signed-off-by: Thomas Oulevey Reviewed-on: http://review.gluster.org/3847 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi Reviewed-by: Vijay Bellur --- extras/init.d/glusterd-Redhat.in | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'extras/init.d/glusterd-Redhat.in') diff --git a/extras/init.d/glusterd-Redhat.in b/extras/init.d/glusterd-Redhat.in index 18f3debc4..c260ca0cf 100755 --- a/extras/init.d/glusterd-Redhat.in +++ b/extras/init.d/glusterd-Redhat.in @@ -57,20 +57,24 @@ stop() case $1 in start) start + RETVAL=$? ;; stop) stop + RETVAL=$? ;; status) status $BASE + RETVAL=$? ;; restart) $0 stop $0 start + RETVAL=$? ;; *) echo $"Usage: $0 {start|stop|status|restart}." exit 1 esac -exit 0 +exit $RETVAL -- cgit