diff options
author | Michael Adam <obnox@samba.org> | 2008-07-15 00:17:58 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-07-15 00:31:10 +0200 |
commit | 52bcb6d70f55e9c35b5930f5d6c144aa4dcd000c (patch) | |
tree | 759ce6ae3b7a5886cef286634ef1d62d0b91276e | |
parent | b385f6626b2ec4038046ece178be480dc0a14a52 (diff) | |
download | samba-52bcb6d70f55e9c35b5930f5d6c144aa4dcd000c.tar.gz samba-52bcb6d70f55e9c35b5930f5d6c144aa4dcd000c.tar.bz2 samba-52bcb6d70f55e9c35b5930f5d6c144aa4dcd000c.zip |
testparm: add a switch --skip-global-checks.
This allows for successfully calling testparm without the need
to "make install" before. Without this, testparm fails with
the message that the lock directory does not exist...
Michael
(This used to be commit eeb018fad65c19804a4e96ea949fc2c64883439e)
-rw-r--r-- | source3/utils/testparm.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c index 03291fe35f..018993ccf3 100644 --- a/source3/utils/testparm.c +++ b/source3/utils/testparm.c @@ -217,6 +217,7 @@ via the %%o substitution. With encrypted passwords this is not possible.\n", lp_ const char *cname; const char *caddr; static int show_defaults; + static int skip_global_checks = 0; struct poptOption long_options[] = { POPT_AUTOHELP @@ -224,6 +225,7 @@ via the %%o substitution. With encrypted passwords this is not possible.\n", lp_ {"verbose", 'v', POPT_ARG_NONE, &show_defaults, 1, "Show default options too"}, {"server", 'L',POPT_ARG_STRING, &new_local_machine, 0, "Set %%L macro to servername\n"}, {"encoding", 't', POPT_ARG_STRING, &term_code, 0, "Print parameters with encoding"}, + {"skip-global-checks", 'g', POPT_ARG_NONE, &skip_global_checks, 1, "Skip the global checks"}, {"show-all-parameters", '\0', POPT_ARG_VAL, &show_all_parameters, True, "Show the parameters, type, possible values" }, {"parameter-name", '\0', POPT_ARG_STRING, ¶meter_name, 0, "Limit testparm to a named parameter" }, {"section-name", '\0', POPT_ARG_STRING, §ion_name, 0, "Limit testparm to a named section" }, @@ -276,7 +278,9 @@ via the %%o substitution. With encrypted passwords this is not possible.\n", lp_ fprintf(stderr,"Loaded services file OK.\n"); - ret = do_global_checks(); + if (skip_global_checks == 0) { + ret = do_global_checks(); + } for (s=0;s<1000;s++) { if (VALID_SNUM(s)) |