Jan-Philipp Litza
49cb4b3fdb
autoupdater: new implementation
...
This new version of the autoupdater is implemented in C instead of Lua,
allowing us to interface with libuclient (HTTP downloads) and libecdsautil
(signature checks) directly instead of spawning external processes,
saving RAM and making error handling more robust.
[Matthias Schiffer: add commit message]
2018-01-13 00:22:27 +01:00
Matthias Schiffer
cae8f9c4ce
autoupdater: fix indentation
2017-02-25 18:09:39 +01:00
Matthias Schiffer
6a2d288006
autoupdater: use SHA256 checksums instead of SHA512
...
We already use SHA256 for the manifest signature, so we'll be able to unify
the implementations after some refactoring.
2017-02-25 01:05:32 +01:00
Matthias Schiffer
ac55ad56b5
autoupdater: convert spaces to tabs
2017-02-24 23:04:05 +01:00
Jan-Philipp Litza
463f872844
autoupdater: add possibility to specify mirrors on commandline ( #123 )
2017-02-24 11:46:43 +01:00
Matthias Schiffer
485186ace2
autoupdater: handle wget hangs during manifest download
...
Make sure that the download is cancelled after the timeout even when wget
doesn't produce output at all.
2017-01-24 21:26:20 +01:00
Matthias Schiffer
90380414f1
autoupdater: add timeouts to wget calls
...
The -T parameter only seems to limit the maximum time between received
packets, but not the overall run time.
This adds simple timeouts to the wget calls (5 minutes for the manifest,
30 minutes for the image). The implementation is very simple, only checking
the manifest timeout each time a line was received, and the image timeout
once a second. A more elegent fix seems like overkill, as the Lua
autoupdater will be replaced with a new implementation after Gluon 2016.2
anyways.
2016-09-08 03:09:30 +02:00
Matthias Schiffer
1acb4b1d3a
autoupdater: add lockfile to prevent concurrent runs
2016-09-08 02:30:20 +02:00
Jan-Tarek Butt
6a618e61da
autoupdater: drop caches a second time after download
...
This is useful to free memory after stopping more services after the
download.
[Matthias Schiffer: improved commit message]
2016-07-19 02:42:18 +02:00
Matthias Schiffer
f375cb7b30
autoupdate: remove potential trailing slash from mirror URL
2016-07-15 02:50:07 +02:00
lemoer
06f2a62b97
autoupdater: add upgrade.d directory.
2016-02-19 17:24:28 +01:00
Matthias Schiffer
b7ce1a2002
autoupdater: add download.d and abort.d directories
...
All executables in download.d are executed before after the update manifest
has been verified, but before the image is downloaded. This can be used to
stop non-essential services to free RAM.
abort.d is run when the download has failed and should revert the actions
of download.d.
2016-01-11 22:03:55 +01:00
Matthias Schiffer
3d98695abc
autoupdater: avoid unnessesary shell processes
...
Use functions that don't run commands though a shell where easily possible,
add 'exec' to remaining io.popen calls.
2016-01-11 21:53:19 +01:00
Matthias Schiffer
129b1146c3
autoupdater: fix indentation
2016-01-11 17:24:58 +01:00
Jan-Philipp Litza
fc35a19d2a
autoupdater: Remove dependencies on luci-base
2015-08-31 21:15:27 +02:00
Matthias Schiffer
dcc5a5ab74
autoupdater: fixes for the new LuCI version
2015-05-22 02:05:00 +02:00
Erik Tews
ef6b4675d6
autoupdater: Timeout for wget.
...
Added a 120 second timeout for wget to prevent it from stalling forever.
2015-02-11 01:06:59 +01:00
Matthias Schiffer
1df94acf98
autoupdater: rework command line parsing, allow overriding branch
...
Unexpected command line arguments will now cause the updater to abort.
2015-01-27 00:33:41 +01:00
Matthias Schiffer
c1068fef42
autoupdater: exit when the image name is not defined for a hardware model
2014-09-09 16:07:35 +02:00
Matthias Schiffer
a54d13eb31
autoupdater: rename oneshot updates to fallback, improve handling for frequent runs
...
The oneshot update now won't be considered until 24h after the priority delay
has passed (so regular updates should have at least one chance to do the updates
even for PRIORITY=0 updates)
2014-07-25 16:54:53 +02:00
Matthias Schiffer
ea3d8703b4
autoupdater: all fallback for situations with no valid time available
2014-07-22 01:55:48 +02:00
Matthias Schiffer
7b9b3058de
autoupdater: add -o (oneshot) switch
...
This switch is used for the fallback mode which ensures that updates are
performed even when a node is off when updates are usually done.
2014-07-21 17:27:47 +02:00
Matthias Schiffer
aae7bf92ed
autoupdater: implement new probablity logic
2014-07-21 17:27:47 +02:00
Matthias Schiffer
12fa328bca
autoupdater: add a utility function to parse RFC3339 timestamps
2014-07-21 17:27:47 +02:00
Matthias Schiffer
dc73c75810
autoupdater: convert to Lua
...
In addition, a new config field 'version_file' is added to remove the last
Gluon-specific part from the autoupdater package.
2014-07-21 17:27:47 +02:00
Matthias Schiffer
d8054d8672
autoupdater: try URL ${BRANCH}.manifest before manifest
...
This will allow storing different manifests for multiple branches in a single
directory.
2014-07-14 23:12:44 +02:00
Matthias Schiffer
916bbae68e
Split parts not Gluon-specific out of gluon-autoupdater
2014-07-11 14:06:42 +02:00