summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAlexey Lebedeff <alebedev@mirantis.com>2016-06-08 17:42:26 +0300
committerAlexey Lebedeff <alebedev@mirantis.com>2016-06-08 17:42:38 +0300
commitcef24b75d605eae79137b2cdf7b15b373c091ba5 (patch)
tree2724100354d166593651f67edf49764aa07dc849 /scripts
parentd59ac4c4700e370a8bb27864fdcd15cc5dcece19 (diff)
downloadrabbitmq-server-git-cef24b75d605eae79137b2cdf7b15b373c091ba5.tar.gz
Fix bashisms in OCF HA script
`-` is not allowed in function names by POSIX, and some shells (e.g. `dash`) will consider this as a syntax error.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/rabbitmq-server-ha.ocf14
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/rabbitmq-server-ha.ocf b/scripts/rabbitmq-server-ha.ocf
index 6c1e52251e..cd07d0c1b0 100755
--- a/scripts/rabbitmq-server-ha.ocf
+++ b/scripts/rabbitmq-server-ha.ocf
@@ -1591,7 +1591,7 @@ get_monitor() {
fi
fi
- if ! is-cluster-status-ok ; then
+ if ! is_cluster_status_ok ; then
rc=$OCF_ERR_GENERIC
fi
@@ -1634,13 +1634,13 @@ get_monitor() {
return $rc
}
-ocf-update-private-attr() {
+ocf_update_private_attr() {
local attr_name="${1:?}"
local attr_value="${2:?}"
ocf_run attrd_updater -p --name "$attr_name" --update "$attr_value"
}
-rabbitmqctl-with-timeout-check() {
+rabbitmqctl_with_timeout_check() {
local command="${1:?}"
local timeout_attr_name="${2:?}"
@@ -1660,9 +1660,9 @@ rabbitmqctl-with-timeout-check() {
esac
}
-is-cluster-status-ok() {
- local LH="${LH}: is-cluster-status-ok:"
- rabbitmqctl-with-timeout-check cluster_status rabbit_cluster_status_timeouts > /dev/null 2>&1
+is_cluster_status_ok() {
+ local LH="${LH}: is_cluster_status_ok:"
+ rabbitmqctl_with_timeout_check cluster_status rabbit_cluster_status_timeouts > /dev/null 2>&1
}
action_monitor() {
@@ -1707,7 +1707,7 @@ action_start() {
local attrs_to_zero="rabbit_list_channels_timeouts rabbit_get_alarms_timeouts rabbit_list_queues_timeouts rabbit_cluster_status_timeouts"
local attr_name_to_reset
for attr_name_to_reset in $attrs_to_zero; do
- ocf-update-private-attr $attr_name_to_reset 0
+ ocf_update_private_attr $attr_name_to_reset 0
done
ocf_log info "${LH} Deleting start time attribute"