Author: metze
Date: 2007-05-01 03:25:17 +0000 (Tue, 01 May 2007)
New Revision: 22622

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22622

Log:
make it possible to pass the config file via 'SMB_CONF_PATH' envvar

very usefull for make testenv!

this makes it also possible to pass a config file to smbscript

metze
Modified:
   branches/SAMBA_4_0/source/lib/cmdline/popt_common.c
   branches/SAMBA_4_0/source/scripting/ejs/smbscript.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/cmdline/popt_common.c
===================================================================
--- branches/SAMBA_4_0/source/lib/cmdline/popt_common.c 2007-05-01 03:22:17 UTC 
(rev 22621)
+++ branches/SAMBA_4_0/source/lib/cmdline/popt_common.c 2007-05-01 03:25:17 UTC 
(rev 22622)
@@ -69,6 +69,10 @@
 
                /* and logging */
                setup_logging(pname, DEBUG_STDOUT);
+
+               if (getenv("SMB_CONF_PATH")) {
+                       lp_set_cmdline("config file", getenv("SMB_CONF_PATH"));
+               }
                return;
        }
 

Modified: branches/SAMBA_4_0/source/scripting/ejs/smbscript.c
===================================================================
--- branches/SAMBA_4_0/source/scripting/ejs/smbscript.c 2007-05-01 03:22:17 UTC 
(rev 22621)
+++ branches/SAMBA_4_0/source/scripting/ejs/smbscript.c 2007-05-01 03:25:17 UTC 
(rev 22622)
@@ -52,6 +52,10 @@
 
        fault_setup(argv[0]);
 
+       if (getenv("SMB_CONF_PATH")) {
+               lp_set_cmdline("config file", getenv("SMB_CONF_PATH"));
+       }
+
        ldb_global_init();
 
        gensec_init();

Reply via email to