Hello, since in my resource agent it is important to know if the resource is master/slave or other type I added one simple check in the .ocf-shellfuncs ocf_is_ms. This is the patch.
-- Best regards, Marian Marinov
diff -r 1a692bb1e5b0 heartbeat/.ocf-shellfuncs.in
--- a/heartbeat/.ocf-shellfuncs.in Wed Feb 24 11:27:52 2010 +1100
+++ b/heartbeat/.ocf-shellfuncs.in Thu Feb 25 04:04:17 2010 +0200
@@ -387,6 +387,10 @@
[ "$__OCF_ACTION" = "monitor" -a "$OCF_RESKEY_CRM_meta_interval" = 0 ]
}
+ocf_is_ms() {
+ [ ! -z "${OCF_RESKEY_CRM_meta_master_max}" ] && [ "${OCF_RESKEY_CRM_meta_master_max}" -gt 0 ]
+}
+
# usage: dirname DIR
dirname()
{
signature.asc
Description: This is a digitally signed message part.
_______________________________________________________ Linux-HA-Dev: [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/
