summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2011-06-20 01:05:04 +0400
committerMatthieu Patou <mat@samba.org>2011-06-20 00:30:59 +0200
commit01ce078ed166635c29e89bd012c82e3612393f28 (patch)
tree5b0feaa12a26fa580b7e174143cea5fc328c7d1f
parent957b1ff183cf713bebc4cc9a32cabacc1e86b13e (diff)
downloadsamba-01ce078ed166635c29e89bd012c82e3612393f28.tar.gz
samba-01ce078ed166635c29e89bd012c82e3612393f28.tar.bz2
samba-01ce078ed166635c29e89bd012c82e3612393f28.zip
s4-upgradeprovision: propose the use of findprovisionranges if no ranges are present
Autobuild-User: Matthieu Patou <mat@samba.org> Autobuild-Date: Mon Jun 20 00:30:59 CEST 2011 on sn-devel-104
-rwxr-xr-xsource4/scripting/bin/upgradeprovision14
1 files changed, 14 insertions, 0 deletions
diff --git a/source4/scripting/bin/upgradeprovision b/source4/scripting/bin/upgradeprovision
index 45c14e0027..f10a9fcc9c 100755
--- a/source4/scripting/bin/upgradeprovision
+++ b/source4/scripting/bin/upgradeprovision
@@ -44,6 +44,7 @@ from ldb import (SCOPE_SUBTREE, SCOPE_BASE,
FLAG_MOD_REPLACE, FLAG_MOD_ADD, FLAG_MOD_DELETE,
MessageElement, Message, Dn, LdbError)
from samba import param, dsdb, Ldb
+from samba.common import confirm
from samba.provision import (get_domain_descriptor, find_provision_key_parameters,
get_config_descriptor,
ProvisioningError, get_last_provision_usn,
@@ -1729,6 +1730,19 @@ if __name__ == '__main__':
message(CHANGE, "Old style for usn ranges used")
lastProvisionUSNs[str(names.invocation)] = lastProvisionUSNs["default"]
del lastProvisionUSNs["default"]
+ else:
+ message(SIMPLE, "Your provision lacks provision range information")
+ if confirm("Do you want to run findprovisionusnranges to try to find them ?", False):
+ ldbs.groupedRollback()
+ os.system("%s %s %s %s %s" % (os.path.join(os.path.dirname(sys.argv[0]),
+ "findprovisionusnranges"),
+ "--storedir",
+ paths.private_dir,
+ "-s",
+ smbconf))
+ message(SIMPLE, "Once you applied/adapted the change(s) please restart the upgradeprovision script")
+ sys.exit(0)
+
# Objects will be created with the admin session
# (not anymore system session)
adm_session = admin_session(lp, str(names.domainsid))