diff --git a/Shorewall-core/lib.cli b/Shorewall-core/lib.cli index 28900709a..6b7ad6e5a 100644 --- a/Shorewall-core/lib.cli +++ b/Shorewall-core/lib.cli @@ -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