From 6b86e92d058769c465c3514be859700e1b7f98b1 Mon Sep 17 00:00:00 2001 From: Sol Jerome Date: Wed, 21 Apr 2010 20:59:02 -0500 Subject: bcfg2-repo-validate: Warn when multiple default groups defined (Resolves Ticket #795) Signed-off-by: Sol Jerome --- src/sbin/bcfg2-repo-validate | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/sbin/bcfg2-repo-validate b/src/sbin/bcfg2-repo-validate index 1d16a8148..685916fc9 100755 --- a/src/sbin/bcfg2-repo-validate +++ b/src/sbin/bcfg2-repo-validate @@ -54,6 +54,14 @@ if __name__ == '__main__': included.add(ent) included.discard(filename) + # check for multiple default group definitions + default_groups = lxml.etree.parse("%s/Metadata/groups.xml" \ + % repo).findall('.//Group[@default="true"]') + if len(default_groups) > 1: + print("*** Warning: Multiple default groups defined") + for grp in default_groups: + print(" %s" % grp.get('name')) + # get all XIncluded bundles xdata.xinclude() for bundle in xdata.findall("//Bundle"): -- cgit v1.2.3-1-g7c22