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 <thomas.oulevey@cern.ch>
Reviewed-on: http://review.gluster.org/3847
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
This commit is contained in:
Thomas Oulevey 2012-08-23 11:50:50 +02:00 committed by Vijay Bellur
parent 16e880a958
commit 4b4e9a058f

View File

@ -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