check-setup: get minifirewall version from internal variable
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
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
|
||||
|
||||
* check-setup: get minifirewall version from internal variable (there is no other backward compatible way)
|
||||
|
||||
### Deprecated
|
||||
|
||||
### Removed
|
||||
|
|
|
@ -29,7 +29,7 @@ fi
|
|||
# Check if the firewall file is sourced
|
||||
|
||||
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}" ] \
|
||||
&& [ -r "${FIREWALL_RULES}" ] \
|
||||
|
|
Loading…
Reference in New Issue