summaryrefslogtreecommitdiff
path: root/source4/setup
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2007-12-17 11:12:36 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:51:06 +0100
commit32f439bfa458f7936b507cb5a1e3c74bcb8c68bf (patch)
tree417c255fcd68bfc164e0916772060000fa19309a /source4/setup
parente956111917a432d5ea1a7c5cc2fef6c0c3dcbcc1 (diff)
downloadsamba-32f439bfa458f7936b507cb5a1e3c74bcb8c68bf.tar.gz
samba-32f439bfa458f7936b507cb5a1e3c74bcb8c68bf.tar.bz2
samba-32f439bfa458f7936b507cb5a1e3c74bcb8c68bf.zip
r26503: Change order of arguments in param interface so it's easier to make the
section name optional. Fix several smaller bits and pieces in the Python code. (This used to be commit 1b89311e5fa4fcde060df50e580dc221205cc8ca)
Diffstat (limited to 'source4/setup')
-rwxr-xr-xsource4/setup/provision.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/source4/setup/provision.py b/source4/setup/provision.py
index 71360cecc8..a65eff1cf8 100755
--- a/source4/setup/provision.py
+++ b/source4/setup/provision.py
@@ -110,15 +110,15 @@ if opts.realm is None or opts.domain is None or opts.host_name is None:
print >>sys.stderr, "No domain set"
if opts.host_name is None:
print >>sys.stderr, "No host name set"
- parser.print_help()
+ parser.print_usage()
sys.exit(1)
# cope with an initially blank smb.conf
-lp = param.ParamFile(opts.configfile)
+lp = param.ParamFile()
+lp.read(opts.configfile)
lp.set("realm", opts.realm);
lp.set("workgroup", opts.domain);
lp.set("server role", opts.server_role);
-lp.use()
subobj = provision_guess(lp)
subobj.domain_guid = opts.domain_guid
@@ -161,12 +161,12 @@ if opts.ldap_base:
message("Please install the LDIF located in %s, %s and into your LDAP server, and re-run with --ldap-backend=ldap://my.ldap.server" % (paths.ldap_basedn_ldif, paths.ldap_config_basedn_ldif, paths.ldap_schema_basedn_ldif))
elif opts.partitions_only:
provision_become_dc(setup_dir, subobj, message, False,
- paths, system_session, creds)
+ paths, system_session(), creds)
else:
provision(lp, setup_dir, subobj, message, opts.blank, paths,
- system_session, creds, opts.ldap_backend)
+ system_session(), creds, opts.ldap_backend)
provision_dns(setup_dir, subobj, message, paths,
- system_session, creds)
+ system_session(), creds)
message("To reproduce this provision, run with:")
message("--realm='" + subobj.realm_conf + "' --domain='" + subobj.domain_conf + "' --domain-guid='" + subobj.domain_guid + "' \\")
message("--policy-guid='" + subobj.policyguid + "' --host-name='" + subobj.hostname + "' --host-ip='" + subobj.hostip + "' \\")