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.

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.

--
ObNox


_______________________________________________
Shorewall-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to