diff options
author | Thomas Oulevey <thomas.oulevey@cern.ch> | 2012-08-23 11:50:50 +0200 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2012-08-28 02:58:17 -0700 |
commit | 4b4e9a058f5e591acb5b39df5113beb99258d7ef (patch) | |
tree | 9494f42254a92764ce8cd3dd5071f104ad13e8ad | |
parent | 16e880a9580dc920dedf36856154cf791e7d040a (diff) |
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>
-rwxr-xr-x | extras/init.d/glusterd-Redhat.in | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/extras/init.d/glusterd-Redhat.in b/extras/init.d/glusterd-Redhat.in index 18f3debc4ca..c260ca0cf37 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 |