summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-04-21 12:01:16 +1000
committerAndrew Tridgell <tridge@samba.org>2010-04-21 13:35:56 +1000
commit0c0bbf2932edc55a897029f34faee105e5b694aa (patch)
treeb0ac5c1261200c74854d506d8c735584afe01d12 /source4
parent2dcc84432ec264d6b322c281d0db1d731ce16b1b (diff)
downloadsamba-0c0bbf2932edc55a897029f34faee105e5b694aa.tar.gz
samba-0c0bbf2932edc55a897029f34faee105e5b694aa.tar.bz2
samba-0c0bbf2932edc55a897029f34faee105e5b694aa.zip
s4-provision: set "setup_dir" to the right path
This needs to cope with both running from the build tree or running from the install tree. We use the provision.smb.conf.dc as a sentinal to detect if we are in the build tree. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
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",