diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2009-01-19 21:14:37 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2009-01-19 21:14:37 +0100 |
commit | b876478219b4935013a798962b95596cc45d7c9b (patch) | |
tree | a642259a639d6f1dd8fe451d953af0fec2acb84c /source4 | |
parent | 2254efbf5d34cffbb8b21e8ef3cec06786081a06 (diff) | |
download | samba-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')
-rw-r--r-- | source4/scripting/python/samba/provision.py | 18 | ||||
-rwxr-xr-x | source4/setup/provision | 2 | ||||
-rwxr-xr-x | source4/setup/provision-backend | 2 |
3 files changed, 19 insertions, 3 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. diff --git a/source4/setup/provision b/source4/setup/provision index 55535cfd4a..d097eb9411 100755 --- a/source4/setup/provision +++ b/source4/setup/provision @@ -160,7 +160,7 @@ if opts.server_role == "dc": elif opts.server_role == "member": server_role = "member server" else: - server_role = opts.server_role + server_role = opts.server_role creds = credopts.get_credentials(lp) diff --git a/source4/setup/provision-backend b/source4/setup/provision-backend index aad7de4327..756870d5df 100755 --- a/source4/setup/provision-backend +++ b/source4/setup/provision-backend @@ -90,7 +90,7 @@ if opts.server_role == "dc": elif opts.server_role == "member": server_role = "member server" else: - server_role = opts.server_role + server_role = opts.server_role setup_dir = opts.setupdir if setup_dir is None: |