summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/param/provision.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source4/param/provision.c b/source4/param/provision.c
index 91260c6326..68c87239c1 100644
--- a/source4/param/provision.c
+++ b/source4/param/provision.c
@@ -35,6 +35,7 @@
#include "scripting/python/modules.h"
#include "lib/ldb/pyldb.h"
#include "param/pyparam.h"
+#include "dynconfig/dynconfig.h"
static PyObject *provision_module(void)
{
@@ -138,8 +139,13 @@ NTSTATUS provision_bare(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx,
if (settings->targetdir != NULL)
PyDict_SetItemString(parameters, "targetdir",
PyString_FromString(settings->targetdir));
- PyDict_SetItemString(parameters, "setup_dir",
- PyString_FromString("setup"));
+ if (file_exist("setup/provision.smb.conf.dc")) {
+ PyDict_SetItemString(parameters, "setup_dir",
+ PyString_FromString("setup"));
+ } else {
+ PyDict_SetItemString(parameters, "setup_dir",
+ PyString_FromString(dyn_SETUPDIR));
+ }
PyDict_SetItemString(parameters, "hostname",
PyString_FromString(settings->netbios_name));
PyDict_SetItemString(parameters, "domain",