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/setup/provision | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'source4/setup/provision') diff --git a/source4/setup/provision b/source4/setup/provision index 18142addbf..1573b485d5 100755 --- a/source4/setup/provision +++ b/source4/setup/provision @@ -35,7 +35,7 @@ import samba.ntacls from samba.credentials import DONT_USE_KERBEROS from samba.auth import system_session import samba.getopt as options -from samba.provision import provision, FILL_FULL, FILL_NT4SYNC, FILL_DRS, find_setup_dir, ProvisioningError +from samba.provision import provision, FILL_FULL, FILL_NT4SYNC, FILL_DRS, ProvisioningError from samba.dsdb import ( DS_DOMAIN_FUNCTION_2000, DS_DOMAIN_FUNCTION_2003, @@ -52,8 +52,6 @@ parser.add_option_group(options.VersionOptions(parser)) credopts = options.CredentialsOptions(parser) parser.add_option_group(credopts) parser.add_option("--interactive", help="Ask for names", action="store_true") -parser.add_option("--setupdir", type="string", metavar="DIR", - help="directory with setup files") parser.add_option("--domain", type="string", metavar="DOMAIN", help="set domain") parser.add_option("--domain-guid", type="string", metavar="GUID", @@ -205,10 +203,6 @@ creds = credopts.get_credentials(lp) creds.set_kerberos_state(DONT_USE_KERBEROS) -setup_dir = opts.setupdir -if setup_dir is None: - setup_dir = find_setup_dir() - samdb_fill = FILL_FULL if opts.blank: samdb_fill = FILL_NT4SYNC @@ -241,7 +235,7 @@ else: session = system_session() try: - provision(setup_dir, logger, + provision(logger, session, creds, smbconf=smbconf, targetdir=opts.targetdir, samdb_fill=samdb_fill, realm=opts.realm, domain=opts.domain, domainguid=opts.domain_guid, domainsid=opts.domain_sid, -- cgit