If `AUTOMAKE` is set to `no` in the config file, it is normalized to the
empty string.
This leads to two errors if `find` is provided by Busybox.
There is a conditional where `$AUTOMAKE` is not quoted when compared to
`recursive` leading to the following error:
/usr/share/shorewall/lib.cli-std: line 398: [: =: unary operator expected
In contrast to the non-Busybox case, we don't check for an empty
`$AUTOMAKE` before passing it as an argument to `-maxdepth`, leading to:
/usr/bin/find: Expected a positive decimal integer argument to -maxdepth, but got -type
Refactor the conditionals to eliminate code duplication and fix these two
bugs.
Link: https://gitlab.com/shorewall/code/-/issues/10
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Changing the definitions of SRWL from /sbin/shorewall6 to
'/sbin/shorewall -6' and so on broke the init-scripts since the scripts
test whether `$SRWL` is executable:
test -x $SRWL || exit 0
which now fails:
sh: test: /sbin/shorewall: binary operator expected
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
The invariant sections clause doesn't quite match the official text. It should
read:
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts
not:
with no Invariant Sections, with no Front-Cover, and with no Back-Cover Texts
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
In commit c061d87919 ("Fix links in shorewall(8)") the end of one of
the sentences in the description of the `stop` command was erroneously
truncated.
Fixes: c061d87919 ("Fix links in shorewall(8)")
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Only check for iptables --wait option if we don't already have existing
capabilities. If we have some and they're not up2date / don't match,
it will issue a warning anyway.
If a valid capabilities file exists, it will already cover whether we
can use --wait or not, that's what WAIT_OPTION is for.
Signed-off-by: Christian Ruppert <idl0r@qasl.de>
The iptablesw check, that's just looking for whether -w is supported or
not, previousely caused iptables to list all rules, each time you do
a shorewall check or shorewall start/reload. That might be quite
a lot, depending on the amount of rules you have. It is also no
necessary to parse each rule just to check for -w. Let's switch to the
usually much smaller INPUT chain, to reduce the overhead
- Delete incorrect statement about a list of addresses in SNAT()
- Replace IPv4 Example 6 with one that uses the PROBABILITY column
Signed-off-by: Tom Eastep <teastep@shorewall.net>
- Delete incorrect statement about a list of addresses in SNAT()
- Replace IPv4 Example 6 with one that uses the PROBABILITY column
Signed-off-by: Tom Eastep <teastep@shorewall.net>