On 11/6/18 12:49 PM, ObNox wrote: > On 06/11/2018 19:26, ObNox wrote: > >>>>> Shouldn't all options accepting a "[directory]" argument set the >>>>> internal "${g_confdir}" variable to the specified directory? >>>>> >>>> >>>> No. Specifying a directory simply pushes that directory onto the front >>>> of the CONFIG_PATH. >> >>> If you don't plan to provide some kind of way (a new env var >>> perhaps?) to know for sure Shorewall is using a custom directory for >>> configuration, please tell me and I'll craft something on my own to >>> circumvent this shortcoming. >> >> A bit of research seems to show that there's a $g_shorewalldir which >> holds the needed information. >> >> But, I wonder why it's not available as a variable in "params" file.
Remember that the params file is processsed twice; once in the CLI (where the g_shorewalldir variable lives) and once in the compiler (actually in the $LIBEXECDIR/getparams program) where g_shorewalldir does not exist. > > All right, I got it the way I wanted :-) > > file "/usr/share/shorewall/lib.cli" line 4603 at : > > "setup_product_environment 1" > > I've added, right above : "export g_shorewalldir" and that did the trick! > > Now "$g_shorewalldir" is available in "params" and I can now include > everything I need relative to the processed directory! The variable is > also available in "rules". > > As far as I tested within my environment, I don't seem to notice any > negative impact so I'll keep using it. > In the next release, I'm adding support for $SW_CONFDIR which will hold either /etc/shorewall[6] or the directory specified on the run-line. -Tom -- Tom Eastep \ Q: What do you get when you cross a mobster with Shoreline, \ an international standard? Washington, USA \ A: Someone who makes you an offer you can't http://shorewall.org \ understand \_______________________________________________
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Shorewall-users mailing list Shorewall-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/shorewall-users