summaryrefslogtreecommitdiff
path: root/source4/setup
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-09-22 16:59:29 +0200
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-09-30 16:00:07 +0200
commitcb50af5fe12a09a58c637f98fbf092988b70c579 (patch)
tree7178a59b9a2135202e691c5bb92e2d334de0ec14 /source4/setup
parentb2e8519e321b2bfc304490adc1546e4ea0551844 (diff)
downloadsamba-cb50af5fe12a09a58c637f98fbf092988b70c579.tar.gz
samba-cb50af5fe12a09a58c637f98fbf092988b70c579.tar.bz2
samba-cb50af5fe12a09a58c637f98fbf092988b70c579.zip
s4:provision - Lets the user choose between the supported forest/domain function levels
Adds a parameter "--function-level" which allows to specify the domain and forest function level.
Diffstat (limited to 'source4/setup')
-rwxr-xr-xsource4/setup/provision25
1 files changed, 17 insertions, 8 deletions
diff --git a/source4/setup/provision b/source4/setup/provision
index 8bf08b9e39..9912138fa3 100755
--- a/source4/setup/provision
+++ b/source4/setup/provision
@@ -93,7 +93,10 @@ parser.add_option("--ldap-backend-type", type="choice", metavar="LDAP-BACKEND-TY
parser.add_option("--ldap-backend-nosync", help="Configure LDAP backend not to call fsync() (for performance in test environments)", action="store_true")
parser.add_option("--server-role", type="choice", metavar="ROLE",
choices=["domain controller", "dc", "member server", "member", "standalone"],
- help="Set server role to provision for (default standalone)")
+ help="The server role (domain controller | dc | member server | member | standalone). Default is standalone.")
+parser.add_option("--function-level", type="choice", metavar="FOR-FUN-LEVEL",
+ choices=["2003", "2008", "2008_R2"],
+ help="The domain and forest function level (2003 | 2008 | 2008_R2). Default is (Windows) 2008 (Native).")
parser.add_option("--partitions-only",
help="Configure Samba's partitions, but do not modify them (ie, join a BDC)", action="store_true")
parser.add_option("--targetdir", type="string", metavar="DIR",
@@ -164,6 +167,15 @@ elif opts.server_role == "member":
else:
server_role = opts.server_role
+if opts.function_level is None:
+ dom_for_fun_level = None
+elif opts.function_level == "2003":
+ dom_for_fun_level = DS_DOMAIN_FUNCTION_2003
+elif opts.function_level == "2008":
+ dom_for_fun_level = DS_DOMAIN_FUNCTION_2008
+elif opts.function_level == "2008_R2":
+ dom_for_fun_level = DS_DOMAIN_FUNCTION_2008_R2
+
creds = credopts.get_credentials(lp)
creds.set_kerberos_state(DONT_USE_KERBEROS)
@@ -190,12 +202,9 @@ provision(setup_dir, message,
krbtgtpass=opts.krbtgtpass, machinepass=opts.machinepass,
dnspass=opts.dnspass, root=opts.root, nobody=opts.nobody,
wheel=opts.wheel, users=opts.users,
- serverrole=server_role,
+ serverrole=server_role, dom_for_fun_level=dom_for_fun_level,
ldap_backend_extra_port=opts.ldap_backend_extra_port,
ldap_backend_type=opts.ldap_backend_type,
- ldapadminpass=opts.ldapadminpass,
- ol_mmr_urls=opts.ol_mmr_urls,
- slapd_path=opts.slapd_path,
- setup_ds_path=opts.setup_ds_path,
- nosync=opts.nosync,
- ldap_dryrun_mode=opts.ldap_dryrun_mode)
+ ldapadminpass=opts.ldapadminpass, ol_mmr_urls=opts.ol_mmr_urls,
+ slapd_path=opts.slapd_path, setup_ds_path=opts.setup_ds_path,
+ nosync=opts.nosync,ldap_dryrun_mode=opts.ldap_dryrun_mode)