From 3b4ff07ded89703b2a58ae2c9ca6f0ea82bb5a52 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 1 Aug 2008 20:47:03 +0200 Subject: Actually fix missing substitution variables. (This used to be commit 783412ecb27d646b171993da0ac2f11a821901d3) --- source4/scripting/python/samba/provision.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'source4/scripting/python') diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py index 6b1fd33b9f..6dd9f3b8bd 100644 --- a/source4/scripting/python/samba/provision.py +++ b/source4/scripting/python/samba/provision.py @@ -739,7 +739,8 @@ def setup_samdb(path, setup_path, session_info, credentials, lp, samdb.set_invocation_id(invocationid) load_schema(setup_path, samdb, names.schemadn, names.netbiosname, - names.configdn, names.sitename) + names.configdn, names.sitename, names.serverdn, + names.hostname) samdb.transaction_start() @@ -1423,7 +1424,8 @@ def create_krb5_conf(path, setup_path, dnsdomain, hostname, realm): }) -def load_schema(setup_path, samdb, schemadn, netbiosname, configdn, sitename): +def load_schema(setup_path, samdb, schemadn, netbiosname, configdn, sitename, + serverdn, servername): """Load schema for the SamDB. :param samdb: Load a schema into a SamDB. @@ -1431,6 +1433,8 @@ def load_schema(setup_path, samdb, schemadn, netbiosname, configdn, sitename): :param schemadn: DN of the schema :param netbiosname: NetBIOS name of the host. :param configdn: DN of the configuration + :param serverdn: DN of the server + :param servername: Host name of the server """ schema_data = open(setup_path("schema.ldif"), 'r').read() schema_data += open(setup_path("schema_samba4.ldif"), 'r').read() @@ -1444,8 +1448,10 @@ def load_schema(setup_path, samdb, schemadn, netbiosname, configdn, sitename): "SCHEMADN": schemadn, "NETBIOSNAME": netbiosname, "CONFIGDN": configdn, - "DEFAULTSITE":sitename, - "PREFIXMAP_B64":prefixmap + "DEFAULTSITE": sitename, + "PREFIXMAP_B64": prefixmap, + "SERVERDN": serverdn, + "SERVERNAME": servername, }) check_all_substituted(head_data) samdb.attach_schema_from_ldif(head_data, schema_data) -- cgit