summaryrefslogtreecommitdiff
path: root/source4/scripting
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-01-19 21:14:37 +0100
committerJelmer Vernooij <jelmer@samba.org>2009-01-19 21:14:37 +0100
commitb876478219b4935013a798962b95596cc45d7c9b (patch)
treea642259a639d6f1dd8fe451d953af0fec2acb84c /source4/scripting
parent2254efbf5d34cffbb8b21e8ef3cec06786081a06 (diff)
downloadsamba-b876478219b4935013a798962b95596cc45d7c9b.tar.gz
samba-b876478219b4935013a798962b95596cc45d7c9b.tar.bz2
samba-b876478219b4935013a798962b95596cc45d7c9b.zip
Make sure server_role gets initialized in backend provisioning code -
fixes test.
Diffstat (limited to 'source4/scripting')
-rw-r--r--source4/scripting/python/samba/provision.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py
index 2da54ef14b..91cc074031 100644
--- a/source4/scripting/python/samba/provision.py
+++ b/source4/scripting/python/samba/provision.py
@@ -1195,6 +1195,9 @@ def provision_backend(setup_dir=None, message=None,
lp = param.LoadParm()
lp.load(smbconf)
+ if serverrole is None:
+ serverrole = lp.get("server role")
+
names = guess_names(lp=lp, hostname=hostname, domain=domain,
dnsdomain=realm, serverrole=serverrole,
rootdn=rootdn, domaindn=domaindn, configdn=configdn,
@@ -1405,7 +1408,20 @@ def provision_backend(setup_dir=None, message=None,
message("LDAP admin password: %s" % adminpass)
message(slapdcommand)
- message("Run provision with: --ldap-backend=ldapi --ldap-backend-type=" + ldap_backend_type + " --password=" + adminpass + " " + ldapuser + "--realm=" + names.dnsdomain + " --domain=" + names.domain + " --server-role='" + serverrole + "'")
+ assert isinstance(ldap_backend_type, str)
+ assert isinstance(ldapuser, str)
+ assert isinstance(adminpass, str)
+ assert isinstance(names.dnsdomain, str)
+ assert isinstance(names.domain, str)
+ assert isinstance(serverrole, str)
+ args = ["--ldap-backend=ldapi",
+ "--ldap-backend-type=" + ldap_backend_type,
+ "--password=" + adminpass,
+ ldapuser,
+ "--realm=" + names.dnsdomain,
+ "--domain=" + names.domain,
+ "--server-role='" + serverrole + "'"]
+ message("Run provision with: " + " ".join(args))
def create_phpldapadmin_config(path, setup_path, ldapi_uri):
"""Create a PHP LDAP admin configuration file.