taking this to the pacemaker list... On Wed, Jun 10, 2009 at 02:53:24PM +0200, Andrew Beekhof wrote: > since 1.0.4, giving --version to almost any of the crm tools will give > you the current version number. > it also includes the supported stacks and (if built correctly) the Hg > changeset used.
unfortunately all of them also print the full help text to stdout _and_ exit 0 for unrecognized options. so I need to parse the output to see if I actually got the version, and which one. maybe I can go for the dc-version? but wait: cibadmin -Ql -o crm_config | grep cib-bootstrap-options-dc-version pacemaker: <nvpair id="cib-bootstrap-options-dc-version" name="dc-version" value="1.0.4-3917b11b3a14+ stable-1.0 tip"/> heartbeat 2.1.4: <nvpair id="cib-bootstrap-options-dc-version" name="dc-version" value="2.1.4-node: --node-hash--"/> darn. special case version compare: 1 > 2 for extremly legacy values of 2. so... what is the most easy way to reliably distinguish legacy heartbeat crm 2.0.7, 2.0.8, 2.1.3, 2.1.4 pacemaker crm 0.6, 1.0, 1.x, 2.y (once it is there) regardless of cluster stack? or more specifically, I'd like to be able to see am I running on legacy heartbeat crm, or pacemaker crm, and then "require" a version. I don't really care for what comm layer is in use. Lars _______________________________________________ Pacemaker mailing list Pacemaker@oss.clusterlabs.org http://oss.clusterlabs.org/mailman/listinfo/pacemaker