mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-22 18:51:24 +02: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
|
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
|
# Save currently running configuration
|
||||||
#
|
#
|
||||||
@ -428,7 +439,7 @@ do_save() {
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if ! run_it ${VARDIR}/firewall savesets ${g_restorepath}-ipsets; then
|
if ! savesets; then
|
||||||
case ${SAVE_IPSETS:=No} in
|
case ${SAVE_IPSETS:=No} in
|
||||||
[Yy]es)
|
[Yy]es)
|
||||||
case ${IPSET:=ipset} in
|
case ${IPSET:=ipset} in
|
||||||
|
Loading…
x
Reference in New Issue
Block a user