From eb7c2af83bbebd9e32fdfd459cfef7db15918911 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 13 Jul 2011 10:54:50 +1000 Subject: dbcheck: only do the provision dbcheck if there are objects to check when in FILL_DRS mode, there are no objects to check yet Pair-Programmed-With: Andrew Bartlett --- .../scripting/python/samba/provision/__init__.py | 27 +++++++++++----------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'source4') diff --git a/source4/scripting/python/samba/provision/__init__.py b/source4/scripting/python/samba/provision/__init__.py index 66dcf6a40b..97cf7bff17 100644 --- a/source4/scripting/python/samba/provision/__init__.py +++ b/source4/scripting/python/samba/provision/__init__.py @@ -1837,19 +1837,20 @@ def provision(logger, session_info, credentials, smbconf=None, logger.info("Failed to chown %s to bind gid %u", dns_keytab_path, paths.bind_gid) - # fix any dangling GUIDs from the provision - logger.info("Fixing provision GUIDs") - chk = dbcheck(samdb, samdb_schema=samdb, verbose=False, fix=True, yes=True, quiet=True) - samdb.transaction_start() - chk.check_database(DN=None, controls=["search_options:1:2", "show_deleted:1"], - attrs=['defaultObjectCategory', - 'objectCategory', - 'ipsecOwnersReference', - 'ipsecFilterReference', - 'ipsecISAKMPReference', - 'ipsecNegotiationPolicyReference', - 'ipsecNFAReference']) - samdb.transaction_commit() + if samdb_fill != FILL_DRS: + # fix any dangling GUIDs from the provision + logger.info("Fixing provision GUIDs") + chk = dbcheck(samdb, samdb_schema=samdb, verbose=False, fix=True, yes=True, quiet=True) + samdb.transaction_start() + chk.check_database(DN=None, controls=["search_options:1:2", "show_deleted:1"], + attrs=['defaultObjectCategory', + 'objectCategory', + 'ipsecOwnersReference', + 'ipsecFilterReference', + 'ipsecISAKMPReference', + 'ipsecNegotiationPolicyReference', + 'ipsecNFAReference']) + samdb.transaction_commit() logger.info("Please install the phpLDAPadmin configuration located at %s into /etc/phpldapadmin/config.php", -- cgit