summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorAlexandru Scvortov <alexandru@rabbitmq.com>2010-06-07 13:28:30 +0100
committerAlexandru Scvortov <alexandru@rabbitmq.com>2010-06-07 13:28:30 +0100
commit1b99b5394d7add6edb44f0ab926bef5d0fb636ca (patch)
tree7a3866077dc0d278f674cffdab117f22001a402a /packaging
parentd3b63bfd4603818f0ad60715d920f7f69726e584 (diff)
downloadrabbitmq-server-1b99b5394d7add6edb44f0ab926bef5d0fb636ca.tar.gz
merged Florian's 04 patch
Diffstat (limited to 'packaging')
-rwxr-xr-xpackaging/common/rabbitmq-server.ocf23
1 files changed, 11 insertions, 12 deletions
diff --git a/packaging/common/rabbitmq-server.ocf b/packaging/common/rabbitmq-server.ocf
index d8f8d0d3..a480be23 100755
--- a/packaging/common/rabbitmq-server.ocf
+++ b/packaging/common/rabbitmq-server.ocf
@@ -204,34 +204,34 @@ export_vars() {
rabbit_validate_partial() {
if [ ! -x $RABBITMQ_MULTI ]; then
ocf_log err "rabbitmq-server multi $RABBITMQ_MULTI does not exist or is not executable";
- return $OCF_ERR_ARGS;
+ exit $OCF_ERR_ARGS;
fi
if [ ! -x $RABBITMQ_CTL ]; then
ocf_log err "rabbitmq-server ctl $RABBITMQ_CTL does not exist or is not executable";
- return $OCF_ERR_ARGS;
+ exit $OCF_ERR_ARGS;
fi
}
rabbit_validate_full() {
if [ ! -z $RABBITMQ_CLUSTER_CONFIG_FILE ] && [ ! -e $RABBITMQ_CLUSTER_CONFIG_FILE ]; then
ocf_log err "rabbitmq-server cluster_config_file $RABBITMQ_CLUSTER_CONFIG_FILE does not exist or is not a file";
- return $OCF_ERR_ARGS;
+ exit $OCF_ERR_ARGS;
fi
if [ ! -z $RABBITMQ_CONFIG_FILE ] && [ ! -e $RABBITMQ_CONFIG_FILE ]; then
ocf_log err "rabbitmq-server config_file $RABBITMQ_CONFIG_FILE does not exist or is not a file";
- return $OCF_ERR_ARGS;
+ exit $OCF_ERR_ARGS;
fi
if [ ! -z $RABBITMQ_LOG_BASE ] && [ ! -d $RABBITMQ_LOG_BASE ]; then
ocf_log err "rabbitmq-server log_base $RABBITMQ_LOG_BASE does not exist or is not a directory";
- return $OCF_ERR_ARGS;
+ exit $OCF_ERR_ARGS;
fi
if [ ! -z $RABBITMQ_MNESIA_BASE ] && [ ! -d $RABBITMQ_MNESIA_BASE ]; then
ocf_log err "rabbitmq-server mnesia_base $RABBITMQ_MNESIA_BASE does not exist or is not a directory";
- return $OCF_ERR_ARGS;
+ exit $OCF_ERR_ARGS;
fi
rabbit_validate_partial
@@ -252,7 +252,7 @@ rabbit_status() {
;;
*)
ocf_log err "Unexpected return from rabbitmqctl $NODENAME_ARG status: $rc"
- return $OCF_ERR_GENERIC
+ exit $OCF_ERR_GENERIC
esac
}
@@ -282,10 +282,9 @@ rabbit_start() {
rc=$?
if [ "$rc" = $OCF_SUCCESS ]; then
start_wait=0
-
elif [ "$rc" != $OCF_NOT_RUNNING ]; then
ocf_log info "rabbitmq-server start failed: $rc"
- return $OCF_ERR_GENERIC
+ exit $OCF_ERR_GENERIC
fi
sleep 2
done
@@ -320,7 +319,7 @@ rabbit_stop() {
break
elif [ "$rc" != $OCF_SUCCESS ]; then
ocf_log info "rabbitmq-server stop failed: $rc"
- return $OCF_ERR_GENERIC
+ exit $OCF_ERR_GENERIC
fi
sleep 2
done
@@ -345,9 +344,9 @@ case $__OCF_ACTION in
esac
if ocf_is_probe; then
- rabbit_validate_partial || exit
+ rabbit_validate_partial
else
- rabbit_validate_full || exit
+ rabbit_validate_full
fi
case $__OCF_ACTION in