fix reload_random_seed error handling

https://github.com/QubesOS/qubes-core-agent-linux/pull/21#pullrequestreview-8302473
This commit is contained in:
Patrick Schleizer 2016-11-13 23:37:49 +01:00 committed by GitHub
parent 0fb3e503d3
commit b1f418ca76

View File

@ -93,7 +93,11 @@ is_updateable() {
}
reload_random_seed() {
qubesdb-read /qubes-random-seed | base64 -d > /dev/urandom
local seed
local decoded
seed=$(qubesdb-read /qubes-random-seed)
decoded=$(echo "$seed" | base64 -d)
echo "$decoded" > /dev/urandom
qubesdb-rm /qubes-random-seed
}