summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/cmdline/popt_common.c4
-rw-r--r--source4/scripting/ejs/smbscript.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/source4/lib/cmdline/popt_common.c b/source4/lib/cmdline/popt_common.c
index 1eeb797e6e..1752f43a84 100644
--- a/source4/lib/cmdline/popt_common.c
+++ b/source4/lib/cmdline/popt_common.c
@@ -69,6 +69,10 @@ static void popt_common_callback(poptContext con,
/* and logging */
setup_logging(pname, DEBUG_STDOUT);
+
+ if (getenv("SMB_CONF_PATH")) {
+ lp_set_cmdline("config file", getenv("SMB_CONF_PATH"));
+ }
return;
}
diff --git a/source4/scripting/ejs/smbscript.c b/source4/scripting/ejs/smbscript.c
index 23e2fe2d52..26f4c0f070 100644
--- a/source4/scripting/ejs/smbscript.c
+++ b/source4/scripting/ejs/smbscript.c
@@ -52,6 +52,10 @@ int main(int argc, const char **argv)
fault_setup(argv[0]);
+ if (getenv("SMB_CONF_PATH")) {
+ lp_set_cmdline("config file", getenv("SMB_CONF_PATH"));
+ }
+
ldb_global_init();
gensec_init();