mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-22 14:20:40 +01:00
Avoid confusing output when 4.6.4 CLI executes a 'save'
- If a down-rev firewall is running, the savesets command produces confusing usage output Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
19482ac197
commit
a5086f785f
@ -367,6 +367,17 @@ resolve_arptables() {
|
||||
esac
|
||||
}
|
||||
|
||||
#
|
||||
# Try to run the 'savesets' command
|
||||
#
|
||||
savesets() {
|
||||
local supported
|
||||
|
||||
supported=$(run_it ${VARDIR}/firewall help | fgrep savesets )
|
||||
|
||||
[ -n "$supported" ] && run_it ${VARDIR}/firewall savesets ${g_restorepath}-ipsets
|
||||
}
|
||||
|
||||
#
|
||||
# Save currently running configuration
|
||||
#
|
||||
@ -428,7 +439,7 @@ do_save() {
|
||||
;;
|
||||
esac
|
||||
|
||||
if ! run_it ${VARDIR}/firewall savesets ${g_restorepath}-ipsets; then
|
||||
if ! savesets; then
|
||||
case ${SAVE_IPSETS:=No} in
|
||||
[Yy]es)
|
||||
case ${IPSET:=ipset} in
|
||||
|
Loading…
Reference in New Issue
Block a user