# HG changeset patch
# User Keisuke MORI <kskmori@intellilink.co.jp>
# Date 1371192248 -32400
# Node ID 8b2a18d422fb892d563b4d19f4c77efbd3397f11
# Parent  fd1b907a0de647bb6ae9a503c03ef086ee333c72
Low: skip unnecessary waiting for lrmd invocation when LRMD_MAX_CHILDREN is set

diff -r fd1b907a0de6 -r 8b2a18d422fb heartbeat/init.d/heartbeat.in
--- a/heartbeat/init.d/heartbeat.in	Fri Apr 05 09:42:49 2013 +0200
+++ b/heartbeat/init.d/heartbeat.in	Fri Jun 14 15:44:08 2013 +0900
@@ -281,6 +281,11 @@
 	CrmEnabled || return
 	test -x $LRMADMIN || return
 	if [ -n "$LRMD_MAX_CHILDREN" ]; then
+		local IFS=.
+		set -- `$LRMADMIN -v 2>/dev/null`
+		# lrmd refers LRMD_MAX_CHILDREN as of glue-1.0.10
+		[ "$1" -eq 1 -a "$2" -eq 0 -a "$3" -lt 10 ] || return
+
 		wait_for_lrmd || return
 		$LRMADMIN -p max-children $LRMD_MAX_CHILDREN
 	fi
