Commit Graph

6 Commits

Author SHA1 Message Date
Matthias Schiffer 4346733427 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-02-03 20:01:45 +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 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 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