From 2f5f01567b4c30cd764843a1ca0c7ab6d9bc0882 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 20 Jul 2005 10:07:48 +0000 Subject: r8643: - make lp_configfile() work again - get rid of redundeny dyn_CONFIGFILE argument to lp_load() - fixed provisioning to work with completely pristine install, creating an initial smb.conf is none is present - added lp.set() and lp.reload() to loadparm ejs object interface (This used to be commit c2691ef7126ddcee5f95970b78759b40a049d0a7) --- source4/param/loadparm.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'source4/param') diff --git a/source4/param/loadparm.c b/source4/param/loadparm.c index 354318b2bd..160a7d12de 100644 --- a/source4/param/loadparm.c +++ b/source4/param/loadparm.c @@ -910,6 +910,8 @@ static void init_globals(void) } } + do_parameter("config file", dyn_CONFIGFILE); + /* options that can be set on the command line must be initialised via the slower do_parameter() to ensure that FLAG_CMDLINE is obeyed */ #ifdef TCP_NODELAY @@ -2985,21 +2987,14 @@ static void set_server_role(void) False on failure. ***************************************************************************/ -BOOL lp_load(const char *pszFname) +BOOL lp_load(void) { pstring n2; BOOL bRetval; struct param_opt *data; - pstrcpy(n2, pszFname); - standard_sub_basic(n2,sizeof(n2)); - - add_to_file_list(pszFname, n2); - bRetval = False; - DEBUG(2, ("lp_load: refreshing parameters from %s\n", pszFname)); - bInGlobalSection = True; if (Globals.param_opt != NULL) { @@ -3016,6 +3011,12 @@ BOOL lp_load(const char *pszFname) init_globals(); + pstrcpy(n2, lp_configfile()); + standard_sub_basic(n2,sizeof(n2)); + DEBUG(2, ("lp_load: refreshing parameters from %s\n", n2)); + + add_to_file_list(lp_configfile(), n2); + /* We get sections first, so have to start 'behind' to make up */ iServiceIndex = -1; bRetval = pm_process(n2, do_section, do_parameter); -- cgit