diff options
author | Andrew Bartlett <abartlet@samba.org> | 2011-02-05 10:34:51 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-02-07 13:22:01 +1100 |
commit | d1e5a7380619043a351ba8a25ebb8031163e70b7 (patch) | |
tree | dfb73691356940c847265086d7100286f864b010 /source4/setup/upgrade_from_s3 | |
parent | 4ae013c01b2936e7fd80e674a617f10b54179010 (diff) | |
download | samba-d1e5a7380619043a351ba8a25ebb8031163e70b7.tar.gz samba-d1e5a7380619043a351ba8a25ebb8031163e70b7.tar.bz2 samba-d1e5a7380619043a351ba8a25ebb8031163e70b7.zip |
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
Diffstat (limited to 'source4/setup/upgrade_from_s3')
-rwxr-xr-x | source4/setup/upgrade_from_s3 | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/source4/setup/upgrade_from_s3 b/source4/setup/upgrade_from_s3 index a7bc6f0abd..e0d4604b6e 100755 --- a/source4/setup/upgrade_from_s3 +++ b/source4/setup/upgrade_from_s3 @@ -26,18 +26,14 @@ sys.path.insert(0, "bin/python") import samba import samba.getopt as options from samba.auth import system_session -from samba.provision import find_setup_dir from samba.upgrade import upgrade_provision from samba.samba3 import Samba3 - parser = optparse.OptionParser("upgrade_from_s3 [options] <libdir> <smbconf>") sambaopts = options.SambaOptions(parser) parser.add_option_group(sambaopts) parser.add_option_group(options.VersionOptions(parser)) credopts = options.CredentialsOptions(parser) parser.add_option_group(credopts) -parser.add_option("--setupdir", type="string", metavar="DIR", - help="directory with setup files") parser.add_option("--quiet", help="Be quiet") parser.add_option("--blank", help="do not add users or groups, just the structure") @@ -73,14 +69,10 @@ samba3 = Samba3(libdir, smbconf) logger.info("Provisioning") -setup_dir = opts.setupdir -if setup_dir is None: - setup_dir = find_setup_dir() - lp = sambaopts.get_loadparm() smbconf = lp.configfile creds = credopts.get_credentials(lp) -upgrade_provision(samba3, setup_dir, logger, credentials=creds, +upgrade_provision(samba3, logger, credentials=creds, session_info=system_session(), smbconf=smbconf, targetdir=opts.targetdir) |