summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2012-04-15 23:35:41 +0200
committerJelmer Vernooij <jelmer@samba.org>2012-04-16 16:30:18 +0200
commit8cd7cc33d944699ef8e9d34d31254f80035c0763 (patch)
tree167172d9869a3feb1101bccfb3e84be143028dd3 /source4
parentefa594820ad8be86148b8e36f5a623f8346edea0 (diff)
downloadsamba-8cd7cc33d944699ef8e9d34d31254f80035c0763.tar.gz
samba-8cd7cc33d944699ef8e9d34d31254f80035c0763.tar.bz2
samba-8cd7cc33d944699ef8e9d34d31254f80035c0763.zip
provision: Simplify handling of default for --function-level.
Diffstat (limited to 'source4')
-rwxr-xr-xsource4/setup/provision7
1 files changed, 3 insertions, 4 deletions
diff --git a/source4/setup/provision b/source4/setup/provision
index f4bfe13c71..cb9135600d 100755
--- a/source4/setup/provision
+++ b/source4/setup/provision
@@ -111,7 +111,8 @@ parser.add_option("--server-role", type="choice", metavar="ROLE",
help="The server role (domain controller | dc | member server | member | standalone). Default is dc.")
parser.add_option("--function-level", type="choice", metavar="FOR-FUN-LEVEL",
choices=["2000", "2003", "2008", "2008_R2"],
- help="The domain and forest function level (2000 | 2003 | 2008 | 2008_R2 - always native). Default is (Windows) 2003 Native.")
+ help="The domain and forest function level (2000 | 2003 | 2008 | 2008_R2 - always native). Default is (Windows) 2003 Native.",
+ default="2003")
parser.add_option("--next-rid", type="int", metavar="NEXTRID", default=1000,
help="The initial nextRid value (only needed for upgrades). Default is 1000.")
parser.add_option("--partitions-only",
@@ -200,9 +201,7 @@ server_role = opts.server_role
if server_role is None:
server_role = "domain controller"
-if opts.function_level is None:
- dom_for_fun_level = DS_DOMAIN_FUNCTION_2003
-elif opts.function_level == "2000":
+if opts.function_level == "2000":
dom_for_fun_level = DS_DOMAIN_FUNCTION_2000
elif opts.function_level == "2003":
dom_for_fun_level = DS_DOMAIN_FUNCTION_2003