Hi Tom and all,

I've just decided to add some more autodetection code some params file.

One of the lines looks something like this:
read -rs LOC_NETADDR DUMMY 2> /dev/null < <(ip -o route list proto kernel
scope link dev "$LOC_IF" 2> /dev/null)

The result was a shell error:
/etc/shorewall/params: line 49: syntax error near unexpected token `<'
/etc/shorewall/params: line 49: `read -rs LOC_NETADDR DUMMY 2> /dev/null <
<(ip -o route list proto kernel scope link dev "$LOC_IF" 2> /dev/null)'

Yes of course, because the line contains bashism. But, since the line is
not portable anyway and all our systems have bash by default, I've decided
to configure it via /etc/shorewall/shorewall.conf:

Retried, and the error was the same. I'm wondering if I missed something
because the docs say this:
/etc/shorewall/params - use this file to set shell variables that you will
expand in other files. It is always processed by /bin/sh or by the shell
specified through SHOREWALL_SHELL in /etc/shorewall/shorewall.conf.

Something doesn't seem to work as I expected.

Anyway, I found a simple workaround, in the params file I do:

set +o posix

# Run bashism code here

set -o posix

Works fine and I even like it more than modifying shorewall.conf.


Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Shorewall-users mailing list

Reply via email to