diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-17 12:19:45 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:51:12 +0100 |
commit | 323c174be37214d561a5d525a7c3eef47ac700e8 (patch) | |
tree | 5b4a1dad789bee4f2bbb6f57275c9b936c7eb0f1 /source4/setup/provision.py | |
parent | f89c7a6e5eb082794d64b487e69fc442d138ca28 (diff) | |
download | samba-323c174be37214d561a5d525a7c3eef47ac700e8.tar.gz samba-323c174be37214d561a5d525a7c3eef47ac700e8.tar.bz2 samba-323c174be37214d561a5d525a7c3eef47ac700e8.zip |
r26506: Start running (really trivial) tests for upgrade script.
(This used to be commit 73bd4a9566d15f85a971e3a87cefbec2e2eece1c)
Diffstat (limited to 'source4/setup/provision.py')
-rwxr-xr-x | source4/setup/provision.py | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/source4/setup/provision.py b/source4/setup/provision.py index c9ee2a9217..c5f29c38ea 100755 --- a/source4/setup/provision.py +++ b/source4/setup/provision.py @@ -116,9 +116,9 @@ if opts.realm is None or opts.domain is None or opts.host_name is None: # cope with an initially blank smb.conf lp = param.ParamFile() lp.read(opts.configfile) -lp.set_string("realm", opts.realm); -lp.set_string("workgroup", opts.domain); -lp.set_string("server role", opts.server_role); +lp.set_string("realm", opts.realm) +lp.set_string("workgroup", opts.domain) +lp.set_string("server role", opts.server_role) subobj = provision_guess(lp) subobj.domain_guid = opts.domain_guid @@ -160,22 +160,17 @@ if opts.ldap_base: provision_ldapbase(setup_dir, subobj, message, paths) 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) + provision_become_dc(setup_dir, subobj, message, False, + paths, system_session(), creds) else: - provision(lp, setup_dir, subobj, message, opts.blank, paths, - system_session(), creds, opts.ldap_backend) - provision_dns(setup_dir, subobj, message, paths, - 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 + "' \\") - message("--host-guid='" + subobj.host_guid + "' --invocationid='" + subobj.invocationid + "' \\") - message("--adminpass='" + subobj.adminpass + "' --krbtgtpass='" + subobj.krbtgtpass + "' \\") - message("--machinepass='" + subobj.machinepass + "' --dnspass='" + subobj.dnspass + "' \\") - message("--root='" + subobj.root + "' --nobody='" + subobj.nobody + "' --nogroup-'" + subobj.nogroup + "' \\") - message("--wheel='" + subobj.wheel + "' --users='" + subobj.users + "' --server-role='" + subobj.serverrole + "' \\") - message("--ldap-backend='" + subobj.ldap_backend + "' --ldap-module='" + subobj.ldapmodule + "' \\") - message("--aci='" + subobj.aci + "' \\") + provision(lp, setup_dir, subobj, message, opts.blank, paths, + system_session(), creds, opts.ldap_backend) + provision_dns(setup_dir, subobj, message, paths, system_session(), creds) + message("To reproduce this provision, run with:") + def shell_escape(arg): + if " " in arg: + return '"%s"' % arg + return arg + message(" ".join([shell_escape(arg) for arg in sys.argv])) message("All OK") |