summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2012-04-15 23:36:54 +0200
committerJelmer Vernooij <jelmer@samba.org>2012-04-16 18:12:24 +0200
commit1e949f3cd173fbf86d9b14a6d6e43c81fdc9cc57 (patch)
tree621dacc11a300bfddc3480b2a492c153b89e43b3 /source4
parent8cd7cc33d944699ef8e9d34d31254f80035c0763 (diff)
downloadsamba-1e949f3cd173fbf86d9b14a6d6e43c81fdc9cc57.tar.gz
samba-1e949f3cd173fbf86d9b14a6d6e43c81fdc9cc57.tar.bz2
samba-1e949f3cd173fbf86d9b14a6d6e43c81fdc9cc57.zip
provision: Simplify handling of default for --server-role.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Mon Apr 16 18:12:24 CEST 2012 on sn-devel-104
Diffstat (limited to 'source4')
-rwxr-xr-xsource4/setup/provision12
1 files changed, 4 insertions, 8 deletions
diff --git a/source4/setup/provision b/source4/setup/provision
index cb9135600d..f254fa7113 100755
--- a/source4/setup/provision
+++ b/source4/setup/provision
@@ -108,7 +108,8 @@ parser.add_option("--ldap-backend-type", type="choice", metavar="LDAP-BACKEND-TY
choices=["fedora-ds", "openldap"])
parser.add_option("--server-role", type="choice", metavar="ROLE",
choices=["domain controller", "dc", "member server", "member", "standalone"],
- help="The server role (domain controller | dc | member server | member | standalone). Default is dc.")
+ help="The server role (domain controller | dc | member server | member | standalone). Default is dc.",
+ default="domain controller")
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.",
@@ -196,11 +197,6 @@ if not opts.adminpass:
lp = sambaopts.get_loadparm()
smbconf = lp.configfile
-server_role = opts.server_role
-
-if server_role is None:
- server_role = "domain controller"
-
if opts.function_level == "2000":
dom_for_fun_level = DS_DOMAIN_FUNCTION_2000
elif opts.function_level == "2003":
@@ -254,10 +250,10 @@ try:
ntdsguid=opts.ntds_guid,
invocationid=opts.invocationid, adminpass=opts.adminpass,
krbtgtpass=opts.krbtgtpass, machinepass=opts.machinepass,
- dns_backend=dns_backend,
+ dns_backend=opts.dns_backend,
dnspass=opts.dnspass, root=opts.root, nobody=opts.nobody,
wheel=opts.wheel, users=opts.users,
- serverrole=server_role, dom_for_fun_level=dom_for_fun_level,
+ serverrole=opts.server_role, dom_for_fun_level=dom_for_fun_level,
backend_type=opts.ldap_backend_type,
ldapadminpass=opts.ldapadminpass, ol_mmr_urls=opts.ol_mmr_urls,
slapd_path=opts.slapd_path,