[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-ha-dev
Subject: [Linux-ha-dev] [PATCH] Low: RA: ocf-shellfuncs - added ocf_is_ms
From: Marian Marinov <mm () yuhu ! biz>
Date: 2010-02-25 2:12:35
Message-ID: 201002250412.38784.mm () yuhu ! biz
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
[Attachment #4 (multipart/mixed)]
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
["ocf-shellfuncs.diff" (text/x-patch)]
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" (application/pgp-signature)]
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic