# HG changeset patch
# User Alexander Krauth <[email protected]>
# Date 1293543700 -3600
# Node ID d7200f1845c5bffa7427b0a9d8c460f85e714073
# Parent  01b9f3a556ea2548e23e9251af592b2fb1da4f7f
High: SAPInstance: Return errors for promote and demote action, if not called 
in a clone environment (ocf-tester)

diff -r 01b9f3a556ea -r d7200f1845c5 heartbeat/SAPInstance
--- a/heartbeat/SAPInstance     Tue Dec 28 14:40:49 2010 +0100
+++ b/heartbeat/SAPInstance     Tue Dec 28 14:41:40 2010 +0100
@@ -787,6 +787,11 @@
 then
   CLACT=_clone
 else
+  if [ "$ACTION" = "promote" -o "$ACTION" = "demote" ]
+  then
+    ocf_log err "$ACTION called in a non master/slave environment"
+    exit $OCF_ERR_ARGS
+  fi
   sapinstance_init $OCF_RESKEY_InstanceName
 fi
 
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to