check-setup: get minifirewall version from internal variable
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
there is no other backward compatible way : * really old version don't have a know version * some versions used to display the version on each command, but it is removed. * the VERSION variable seems to be the most forward-compatible way
This commit is contained in:
parent
f0581fee47
commit
aef2637c1e
|
@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
* check-setup: get minifirewall version from internal variable (there is no other backward compatible way)
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
|
@ -29,7 +29,7 @@ fi
|
||||||
# Check if the firewall file is sourced
|
# Check if the firewall file is sourced
|
||||||
|
|
||||||
minifirewall_config=/etc/default/minifirewall
|
minifirewall_config=/etc/default/minifirewall
|
||||||
minifirewall_version=$(/etc/init.d/minifirewall status | head -1 | cut -d ' ' -f 3)
|
minifirewall_version=$(grep -E -o "^VERSION=(\S+)" /etc/init.d/minifirewall | head -1 | cut -d '=' -f 2 | tr -d "'" | tr -d '"')
|
||||||
|
|
||||||
if [ -n "${FIREWALL_RULES}" ] \
|
if [ -n "${FIREWALL_RULES}" ] \
|
||||||
&& [ -r "${FIREWALL_RULES}" ] \
|
&& [ -r "${FIREWALL_RULES}" ] \
|
||||||
|
|
Loading…
Reference in a new issue