From d1e5a7380619043a351ba8a25ebb8031163e70b7 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Sat, 5 Feb 2011 10:34:51 +1100 Subject: s4-provision Remove setup_path, setup_dir and find_setup_dir We now have a reliable way to know the current location of the templates: dyn_SETUPDIR, which is updated for both the in-build and installed binaries. This replaces the function arguments and the distributed resolution of the setup directory with one 'global' function (imported as required). This also removes the ability to specify an alternate setup directory on the command line, as this was rarely if ever used and never tested. Andrew Bartlett --- source4/scripting/python/samba/upgradehelpers.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source4/scripting/python/samba/upgradehelpers.py') diff --git a/source4/scripting/python/samba/upgradehelpers.py b/source4/scripting/python/samba/upgradehelpers.py index 5bd341cedca..3a7dfb39973 100755 --- a/source4/scripting/python/samba/upgradehelpers.py +++ b/source4/scripting/python/samba/upgradehelpers.py @@ -348,14 +348,13 @@ def find_provision_key_parameters(samdb, secretsdb, idmapdb, paths, smbconf, lp) return names -def newprovision(names, setup_dir, creds, session, smbconf, provdir, logger): +def newprovision(names, creds, session, smbconf, provdir, logger): """Create a new provision. This provision will be the reference for knowing what has changed in the since the latest upgrade in the current provision :param names: List of provision parameters - :param setup_dir: Directory where the setup files are stored :param creds: Credentials for the authentification :param session: Session object :param smbconf: Path to the smb.conf file @@ -366,7 +365,7 @@ def newprovision(names, setup_dir, creds, session, smbconf, provdir, logger): shutil.rmtree(provdir) os.mkdir(provdir) logger.info("Provision stored in %s", provdir) - provision(setup_dir, logger, session, creds, smbconf=smbconf, + provision(logger, session, creds, smbconf=smbconf, targetdir=provdir, samdb_fill=FILL_FULL, realm=names.realm, domain=names.domain, domainguid=names.domainguid, domainsid=str(names.domainsid), ntdsguid=names.ntdsguid, -- cgit