summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/scripting/python/samba/provision.py10
-rw-r--r--source4/selftest/env/Samba4.pm8
2 files changed, 6 insertions, 12 deletions
diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py
index 63e50897fe..60dcf06c83 100644
--- a/source4/scripting/python/samba/provision.py
+++ b/source4/scripting/python/samba/provision.py
@@ -189,7 +189,6 @@ def ldb_delete(ldb):
ldb.connect(ldb.filename)
-
def open_ldb(session_info, credentials, dbname):
assert session_info is not None
try:
@@ -641,25 +640,16 @@ def provision_guess(lp):
return subobj
-
def load_schema(setup_dir, subobj, samdb):
"""Load schema."""
src = os.path.join(setup_dir, "schema.ldif")
-
schema_data = open(src, 'r').read()
-
src = os.path.join(setup_dir, "schema_samba4.ldif")
-
schema_data += open(src, 'r').read()
-
schema_data = substitute_var(schema_data, subobj.subst_vars())
-
src = os.path.join(setup_dir, "provision_schema_basedn_modify.ldif")
-
head_data = open(src, 'r').read()
-
head_data = substitute_var(head_data, subobj.subst_vars())
-
samdb.attach_dsdb_schema_from_ldif(head_data, schema_data)
diff --git a/source4/selftest/env/Samba4.pm b/source4/selftest/env/Samba4.pm
index dbddb25465..f2ba37f618 100644
--- a/source4/selftest/env/Samba4.pm
+++ b/source4/selftest/env/Samba4.pm
@@ -628,8 +628,12 @@ nogroup:x:65534:nobody
my @provision_options = ();
push (@provision_options, "NSS_WRAPPER_PASSWD=\"$nsswrap_passwd\"");
push (@provision_options, "NSS_WRAPPER_GROUP=\"$nsswrap_group\"");
- push (@provision_options, "$self->{bindir}/smbscript");
- push (@provision_options, "$self->{setupdir}/provision");
+ if (defined($ENV{PROVISION_PYTHON})) {
+ push (@provision_options, "$self->{setupdir}/provision.py");
+ } else {
+ push (@provision_options, "$self->{bindir}/smbscript");
+ push (@provision_options, "$self->{setupdir}/provision");
+ }
push (@provision_options, split(' ', $configuration));
push (@provision_options, "--host-name=$netbiosname");
push (@provision_options, "--host-ip=$ifaceipv4");