Jeremy Sowden
5e8ce7d073
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: https://gitlab.com/shorewall/code/-/issues/10
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2023-09-04 21:06:30 +01:00
Tom Eastep
e4c2122532
Eliminate duplicate function names between lib.cli and lib.cli-std
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2020-09-15 11:45:45 -07:00
Tom Eastep
f16e666858
Redirect STDERR to STDOUT when using $PAGER
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2020-09-13 15:46:04 -07:00
Tom Eastep
b5f3294adb
Set SHOREWALL_SHELL=/sbin/sh if it isn't set and export or test
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2020-09-13 15:33:01 -07:00
Tom Eastep
07160c5ed1
Add 'blacklist!' command.
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2020-06-06 10:13:46 -07:00
Tom Eastep
7882c87afe
Allow AUTOMAKE to work with symbolic links
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2020-05-14 09:22:44 -07:00
Tuomo Soini
be924ff765
Fix http links to point to current project website
...
Also removes deprecated Shorewall6/configfiles/masq
Signed-off-by: Tuomo Soini <tis@foobar.fi>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2020-03-27 14:24:37 -07:00
Tom Eastep
b52a330f41
Replace trace, debug and nolock with options
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2020-03-07 17:48:10 -08:00
Matt Darfeuille
53495ec0a8
Point exclusively to shorewall.org
...
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-03-25 11:35:00 -07:00
Tom Eastep
8f42a6a72b
Remove LOAD_HELPERS_ONLY
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-02-03 10:04:19 -08:00
Tom Eastep
03d2088cf7
Implement SW_CONFDIR support
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-11-06 15:40:26 -08:00
Matt Darfeuille
14e5a2d5ca
Be more verbose in progress messages
...
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-06-23 09:02:18 -07:00
Tom Eastep
07654d8f8d
Fix 'compile -c'
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-05-05 13:26:58 -07:00
Tom Eastep
b5e8f9bd50
Restore the read_yesno_with_timeout() function
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-05-04 08:52:40 -07:00
Matt Darfeuille
99be0ce970
Use a function to load configuration files
...
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-04-14 13:06:54 -07:00
Tom Eastep
c59ff50de4
Process params file in remote_capture()
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-04-13 08:49:35 -07:00
Matt Darfeuille
3df5c032da
Be more verbose when executing remote commands
...
- Reword progress messages
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-04-12 11:12:39 -07:00
Matt Darfeuille
299ea2b41f
Update version to 5.2
...
- Remove unneeded punctuation marks
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-03-24 09:53:02 -07:00
Matt Darfeuille
47a59cdd7c
Add and document the remote-getcaps command
...
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-03-18 17:36:38 -07:00
Matt Darfeuille
676ca872d6
Add and document the remote-getrc command
...
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-03-18 17:36:33 -07:00
Matt Darfeuille
ef28208c0e
Use a more consistent name for function definition
...
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-03-18 17:36:20 -07:00
Matt Darfeuille
cdeb82bdab
Improve when to capture capabilities
...
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-03-18 17:35:42 -07:00
Tom Eastep
e08e239c00
Implement AUTOMAKE=recursive
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-03-03 15:50:56 -08:00
Tom Eastep
02ed6f26a9
Allow AUTOMAKE=<depth> to specify search depth
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-03-03 13:04:48 -08:00
Tom Eastep
9e002a7689
Be sure that mutex is released when exiting
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-28 13:38:30 -08:00
Tom Eastep
8bc97bcd35
Replace ${VARDIR}/firewall with $g_firewall in CLI
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-23 12:40:14 -08:00
Tom Eastep
73b39abd62
Remove INLINE_MATCHES
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-07 14:41:49 -08:00
Tom Eastep
3903fe5fd9
Remove the 'refresh' command
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-02-07 12:38:24 -08:00
Tom Eastep
92ce1beddc
Move read_yesno_with_timeout() to lib.cli-std
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-20 14:26:13 -08:00
Tom Eastep
5d7dcc3122
Unify variable style
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-18 13:42:13 -08:00
Tom Eastep
422d0b216a
Don't use the -quit option to Busybox find
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-18 13:39:44 -08:00
Tom Eastep
eaccf033c6
Update copyrights for 2018
...
- Update some header versions to 5.1
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-07 14:24:01 -08:00
Tom Eastep
2c3f121835
Don't call setup_dbl() unconditionally
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-02 13:11:31 -08:00
Tom Eastep
18ba5c7311
Don't verify 'conntrack' utility for 'remote-' commands
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2018-01-02 11:52:35 -08:00
Tom Eastep
09980cc75e
Use split() in uptodate()
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-31 15:59:28 -08:00
Tom Eastep
e0a757ea03
Quit find after finding the first newer file
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-31 14:15:45 -08:00
Tom Eastep
550003f0f4
Only look at regular files when running 'find'
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-31 14:09:51 -08:00
Tom Eastep
4f50303318
Merge branch '5.1.10'
...
# Conflicts:
# Shorewall/lib.cli-std
2017-12-31 14:06:52 -08:00
Tom Eastep
5053999442
Don't run 'find' in the PWD
...
- Also remove -mindepth so as to catch deletions in the directories
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-31 13:33:16 -08:00
Tom Eastep
6b5889177b
Correct startup_error() inadvertent change
...
- Switch ensure_root() back to calling startup_error()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-30 09:24:21 -08:00
Tom Eastep
377c9f5708
Only search files in each CONFIG_PATH directory - no recursion
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-30 08:44:05 -08:00
Tom Eastep
4e5b98d3d9
Only search files in each CONFIG_PATH directory - no recursion
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-29 15:42:09 -08:00
Tom Eastep
9bd10c0c00
Call fatal_error (not startup_error) when non-root does default compile
...
- Also reword the message
2017-12-29 12:49:43 -08:00
Tom Eastep
d8a22d13dd
Allow non-root to run many 'show' commands
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-12-28 10:49:09 -08:00
Tom Eastep
d22210c074
Set g_export before calling get_config()
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-11-14 13:46:41 -08:00
Tom Eastep
f411f7dd31
Remove redundant test
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-11-14 10:45:10 -08:00
Tom Eastep
f73bad440d
Don't verify IP and SHOREWALL_SHELL when compiling/checking for test
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-11-14 10:02:15 -08:00
Tom Eastep
9d299ef866
Don't verify IP and SHOREWALL_SHELL setting when compiling for export
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-11-14 08:50:05 -08:00
Tom Eastep
90f33dd436
Eliminate MODULE_SUFFIX
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-08-23 12:48:14 -07:00
Tom Eastep
bb70a3637b
Add PERL_HASH_SEED option
...
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2017-05-02 07:51:37 -07:00