gluon-autoupdater: don't reference old autoupdater util library

Fixes #1310
This commit is contained in:
Matthias Schiffer 2018-01-17 00:42:02 +01:00
parent 99b02701cc
commit 18feb29b29
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C

View File

@ -36,9 +36,10 @@ uci:set('autoupdater', 'settings', 'version_file', '/lib/gluon/release')
uci:save('autoupdater') uci:save('autoupdater')
local autoupdater_util = require 'autoupdater.util' local urandom = io.open('/dev/urandom', 'r')
autoupdater_util.randomseed() local seed1, seed2 = urandom:read(2):byte(1, 2)
math.randomseed(seed1*0x100 + seed2)
urandom:close()
-- Perform updates at a random time between 04:00 and 05:00, and once an hour -- Perform updates at a random time between 04:00 and 05:00, and once an hour
-- a fallback update (used after the regular updates haven't worked for -- a fallback update (used after the regular updates haven't worked for