From 80ebea31cf8b72efdb99095d1b2c3c4bf5721bce Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Thu, 28 Apr 2022 18:59:16 +0200 Subject: [PATCH] source configuration only for valid actions --- CHANGELOG | 1 + minifirewall | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 5f82a8d..b7d1f83 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -16,6 +16,7 @@ and this project **does not adhere to [Semantic Versioning](http://semver.org/sp * use long options in some places * output is normalized * source legacy config after macros but before DROP policy +* source configuration only for valid actions * improve legacy config parsing ### Deprecated diff --git a/minifirewall b/minifirewall index 5a0a89f..51d582a 100755 --- a/minifirewall +++ b/minifirewall @@ -1049,27 +1049,39 @@ of the License. END } -source_configuration -check_unpersisted_state - case "${1:-''}" in start) + source_configuration + check_unpersisted_state + start ;; stop) + source_configuration + check_unpersisted_state + stop ;; status) + source_configuration + check_unpersisted_state + status ;; reset) + source_configuration + check_unpersisted_state + reset ;; restart) + source_configuration + check_unpersisted_state + stop start ;;