Skip to content

lib.cli-std: fix two shell errors when AUTOMAKE is false

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: #10 Signed-off-by: Jeremy Sowden jeremy@azazel.net

Merge request reports