Skip to content

Commit

Permalink
firewall: run the firewall conf migration before running nftable's re…
Browse files Browse the repository at this point in the history
…genconf
  • Loading branch information
alexAubin committed Feb 25, 2025
1 parent 3117810 commit 8720d93
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,14 @@ def tools_regen_conf(

from yunohost.regenconf import regen_conf

if (names == [] or "nftables" in names) and tools_migrations_state()["migrations"].get("0032_firewall_config") not in ["skipped", "done"]:
# Make sure the firewall conf is migrated before running the regenconf,
# otherwise the nftable regenconf wont work
try:
tools_migrations_run(["0032_firewall_config"])
except Exception as e:
logger.error(e)

return regen_conf(names, with_diff, force, dry_run, list_pending)


Expand Down

0 comments on commit 8720d93

Please sign in to comment.