Commit Graph

11 Commits

Author SHA1 Message Date
Daniel Ehlers 036f573ae7 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.
2014-01-20 23:31:15 +01:00
Daniel Ehlers 7f3e2ec201 gluon-autoupdater: Less global variables.
This also removes the need for the cleanup function. Instead the cleanup
code is moved in place.
2014-01-20 23:31:15 +01:00
Daniel Ehlers 39052fd0b7 gluon-autoupdater: Refactor code.
Move building blocks of the update into seperate functions.
2014-01-20 13:26:58 +01:00
Nils Schneider 6d0234a813 gluon-autoupdater: typo corrected 2014-01-19 23:19:55 +01:00
Jan-Philipp Litza 5cad7dba41 gluon-autoupdater: get random number from urandom
The approach with awk's rand() wasn't really random between across
devices: When srand() was called without arguments, time() was used as
seed, which of course is the same on all devices when the script is
called via cron at HH:00:00.

This patch instead uses /dev/urandom as source of random (we don't need
cryptographically strong random numbers, so urandom is just fine) but
still uses awk for the comparison as busybox's ash cannot deal with
floats in $(())
2014-01-19 22:36:49 +01:00
Jan-Philipp Litza 1a00f672fe autoupdater: Use awk instead of grep+head+tail to split manifest 2014-01-17 16:09:34 +01:00
Nils Schneider 137a311e1e gluon-autoupdater: strip trailing - from model 2014-01-13 12:45:55 +01:00
Matthias Schiffer 2f9b06e825 gluon-autoupdater: use the new get_model function 2014-01-12 21:40:19 +01:00
Nils Schneider d101e2d6af gluon-autoupdater: remove dead code
Recently the autoupdater contained a case statement to distinguish
between TP-Link WDR3600 and TP-Link WDR4300. This was left over from
previous development versions of autoupdater that relied on the board
name instead of the model. It is thus no longer needed and be removed
safely.
2014-01-12 21:18:27 +01:00
Nils Schneider edcc573976 gluon-autoupdater: new branch specification
It is now possible to specific multiple branches like this:

config branch stable
  option url ...
  list pubkey ...
  ...

config branch testing
  ...

and select one in autoupdater.settings:

config autoupdater settings
  option branch "stable"
2013-10-02 13:33:47 +02:00
Nils Schneider 5e4f29304b gluon-autoupdater: rename script to autoupdater (was autoupdate) 2013-10-02 13:18:48 +02:00