fff-layer3-config: fix exit status of uci-default scripts
ci/woodpecker/push/woodpecker Pipeline was successful
Details
ci/woodpecker/push/woodpecker Pipeline was successful
Details
OpenWrt only removes uci-defaults scripts if the exit status of the executed script is 0. Fix the exit code of the layer3-config migration scripts so they are removed as intended. Fixes: #313 Signed-off-by: Fabian Bläse <fabian@blaese.de>
This commit is contained in:
parent
797c3ddca0
commit
1d2c835b53
|
@ -7,7 +7,7 @@
|
||||||
BOARD="$(uci get board.model.name)"
|
BOARD="$(uci get board.model.name)"
|
||||||
|
|
||||||
# only migrate appropriate config versions
|
# only migrate appropriate config versions
|
||||||
[ "$(uci -q get gateway.meta.config_version)" = "1" ] || exit 1
|
[ "$(uci -q get gateway.meta.config_version)" = "1" ] || exit 0
|
||||||
|
|
||||||
translate_ports() {
|
translate_ports() {
|
||||||
local vlan="$1"
|
local vlan="$1"
|
||||||
|
@ -77,3 +77,5 @@ esac
|
||||||
|
|
||||||
uci set gateway.meta.config_version='2'
|
uci set gateway.meta.config_version='2'
|
||||||
uci commit gateway
|
uci commit gateway
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
BOARD="$(uci get board.model.name)"
|
BOARD="$(uci get board.model.name)"
|
||||||
|
|
||||||
# only migrate appropriate config versions
|
# only migrate appropriate config versions
|
||||||
[ "$(uci -q get gateway.meta.config_version)" = "2" ] || exit 1
|
[ "$(uci -q get gateway.meta.config_version)" = "2" ] || exit 0
|
||||||
|
|
||||||
translate_ports() {
|
translate_ports() {
|
||||||
local vlan="$1"
|
local vlan="$1"
|
||||||
|
@ -74,3 +74,5 @@ esac
|
||||||
|
|
||||||
uci set gateway.meta.config_version='3'
|
uci set gateway.meta.config_version='3'
|
||||||
uci commit gateway
|
uci commit gateway
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
Loading…
Reference in New Issue