summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-05-23 16:43:26 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-05-23 16:43:26 +0200
commita203ee1ab18ea68c6df436f8bb9fc0772611d5d1 (patch)
tree03456a1c36c425ac67904e85c9b4a8a7edef10d0 /source4/scripting/python
parente3d000f3bfad4126ab781f15848fff3bbd8abcc5 (diff)
downloadsamba-a203ee1ab18ea68c6df436f8bb9fc0772611d5d1.tar.gz
samba-a203ee1ab18ea68c6df436f8bb9fc0772611d5d1.tar.bz2
samba-a203ee1ab18ea68c6df436f8bb9fc0772611d5d1.zip
Fix indentation, add docstring in provisioning script.
(This used to be commit 86a8a085496c292b390c0d6362e3e4d9980df83f)
Diffstat (limited to 'source4/scripting/python')
-rw-r--r--source4/scripting/python/samba/provision.py29
1 files changed, 15 insertions, 14 deletions
diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py
index fdcc3dad77..a4730d8a07 100644
--- a/source4/scripting/python/samba/provision.py
+++ b/source4/scripting/python/samba/provision.py
@@ -48,6 +48,7 @@ __docformat__ = "restructuredText"
DEFAULTSITE = "Default-First-Site-Name"
class InvalidNetbiosName(Exception):
+ """A specified name was not a valid NetBIOS name."""
def __init__(self, name):
super(InvalidNetbiosName, self).__init__("The name '%r' is not a valid NetBIOS name" % name)
@@ -1233,7 +1234,7 @@ def provision_backend(setup_dir=None, message=None,
scope=SCOPE_SUBTREE)
if target is not None:
refint_attributes = refint_attributes + " " + target + " " + res[i]["lDAPDisplayName"][0]
- memberof_config = memberof_config + """overlay memberof
+ memberof_config += """overlay memberof
memberof-dangling error
memberof-refint TRUE
memberof-group-oc top
@@ -1243,7 +1244,7 @@ memberof-dangling-error 32
"""
- memberof_config = memberof_config + """
+ memberof_config += """
overlay refint
refint_attributes""" + refint_attributes + "\n"
@@ -1259,18 +1260,18 @@ refint_attributes""" + refint_attributes + "\n"
setup_file(setup_path("modules.conf"), paths.modulesconf,
{"REALM": names.realm})
- setup_db_config(setup_path, os.path.join(paths.ldapdir, os.path.join("db", "user")))
- setup_db_config(setup_path, os.path.join(paths.ldapdir, os.path.join("db", "config")))
- setup_db_config(setup_path, os.path.join(paths.ldapdir, os.path.join("db", "schema")))
- mapping = "schema-map-openldap-2.3"
- backend_schema = "backend-schema.schema"
-
- ldapi_uri = "ldapi://" + urllib.quote(os.path.join(paths.private_dir, "ldap", "ldapi"), safe="")
- if ldap_backend_port is not None:
- server_port_string = " -h ldap://0.0.0.0:%d" % ldap_backend_port
- else:
- server_port_string = ""
- slapdcommand="Start slapd with: slapd -f " + paths.ldapdir + "/slapd.conf -h " + ldapi_uri + server_port_string
+ setup_db_config(setup_path, os.path.join(paths.ldapdir, os.path.join("db", "user")))
+ setup_db_config(setup_path, os.path.join(paths.ldapdir, os.path.join("db", "config")))
+ setup_db_config(setup_path, os.path.join(paths.ldapdir, os.path.join("db", "schema")))
+ mapping = "schema-map-openldap-2.3"
+ backend_schema = "backend-schema.schema"
+
+ ldapi_uri = "ldapi://" + urllib.quote(os.path.join(paths.private_dir, "ldap", "ldapi"), safe="")
+ if ldap_backend_port is not None:
+ server_port_string = " -h ldap://0.0.0.0:%d" % ldap_backend_port
+ else:
+ server_port_string = ""
+ slapdcommand="Start slapd with: slapd -f " + paths.ldapdir + "/slapd.conf -h " + ldapi_uri + server_port_string
schema_command = "bin/ad2oLschema --option=convert:target=" + ldap_backend_type + " -I " + setup_path(mapping) + " -H tdb://" + schemadb_path + " -O " + os.path.join(paths.ldapdir, backend_schema)