mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
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>
This commit is contained in:
parent
2dcc84432e
commit
0c0bbf2932
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user