Skip to content
Snippets Groups Projects
Commit 27871c0d authored by Daniel Ehlers's avatar Daniel Ehlers
Browse files

gluon-autoupdater: Enable list of mirrors for manifest and firmware.

Instead of a single url this patch allows to have a list of urls. So in case
of network instability a router can still reach local mesh-cloud server to pull
a update from. In this stage the autoupdater simply tries every mirror until
one passes all tests.
parent cb6c025a
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@ if test "a$1" != "a-f"; then
fi
fi
BASE=$(uci get autoupdater.${BRANCH}.url)
MIRRORS=$(uci get autoupdater.${BRANCH}.mirror)
PUBKEYS=$(uci get autoupdater.${BRANCH}.pubkey)
GOOD_SIGNATURES=$(uci get autoupdater.${BRANCH}.good_signatures)
......@@ -166,4 +166,13 @@ fi
my_version="$(cat "$VERSION_FILE")"
autoupdate $BASE && exit 0
for mirror in $MIRRORS; do
autoupdate $mirror && exit 0
unset fw_version
unset fw_md5
unset fw_file
done
......@@ -28,10 +28,14 @@ delete autoupdater.$name
set autoupdater.$name=branch
END
for (qw(url probability good_signatures)) {
for (qw(probability good_signatures)) {
print "set autoupdater.$name.$_=$branch->{$_}\n";
}
for (@{$branch->{mirrors}}) {
print "add_list autoupdater.$name.mirror=$_\n";
}
for (@{$branch->{pubkeys}}) {
print "add_list autoupdater.$name.pubkey=$_\n";
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment