Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Check the is_slave return code properly.

  • Loading branch information...
commit 3f91cff7920c308957ac32159ecfec43b28bdf93 1 parent 3fb6c93
Justin Burnham jburnham authored committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 heartbeat/mysql
4 heartbeat/mysql
View
@@ -875,7 +875,9 @@ mysql_monitor() {
if [ $OCF_CHECK_LEVEL -gt 0 -a -n "$OCF_RESKEY_test_table" ]; then
# Check if this instance is configured as a slave, and if so
# check slave status
- if [ is_slave -o "$OCF_RESKEY_CRM_meta_role" = "Slave" ]; then
+ is_slave
+ rc=$?
+ if [ $rc -eq 0 -o "$OCF_RESKEY_CRM_meta_role" == "Slave" ]; then
check_slave
fi
Please sign in to comment.
Something went wrong with that request. Please try again.