On 06/11/2018 18:42, 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.

Perhaps some kind of "g_custom_confdir" new variable would be nice with a minimal impact on existing configurations ?

Something like :

g_custom_confdir=$g_confdir

if [ -n "$g_shorewalldir" ]; then
  g_custom_confdir=$g_shorewalldir
fi

and export this variable so it would be available everywhere. This would be very useful and would guaranty that every single included file in a custom configuration directory would be correctly included instead of using an "old" fallback in /etc/shorewall if the same file with similar vars/settings already existed.

--
ObNox


_______________________________________________
Shorewall-users mailing list
Shorewall-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to