forked from freifunk-franken/firmware
fff-gateway: improve order of commands for config version check
Move retrieval of config version, as it makes sense to check for existance of containing file beforehand. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Reviewed-by: Robert Langhammer <rlanghammer@web.de> Reviewed-by: Fabian Bläse <fabian@blaese.de>
This commit is contained in:
parent
4791c24608
commit
6d91d805a7
|
@ -1,7 +1,4 @@
|
||||||
configure() {
|
configure() {
|
||||||
local expected_version=1
|
|
||||||
local config_version=$(uci -q get gateway.meta.config_version)
|
|
||||||
|
|
||||||
# check if gateway config exists
|
# check if gateway config exists
|
||||||
if ! uci -q show gateway > /dev/null; then
|
if ! uci -q show gateway > /dev/null; then
|
||||||
echo "ERROR: Gateway config could not be parsed or does not exist."
|
echo "ERROR: Gateway config could not be parsed or does not exist."
|
||||||
|
@ -10,6 +7,9 @@ configure() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# check version of configuration
|
# check version of configuration
|
||||||
|
local expected_version=1
|
||||||
|
local config_version=$(uci -q get gateway.meta.config_version)
|
||||||
|
|
||||||
if ! [ -n "$config_version" ]; then
|
if ! [ -n "$config_version" ]; then
|
||||||
echo "ERROR: No config version given. Supported versions: '$expected_version'"
|
echo "ERROR: No config version given. Supported versions: '$expected_version'"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue