From b1f418ca76d4ccf6639890167167fb2995fad73d Mon Sep 17 00:00:00 2001 From: Patrick Schleizer Date: Sun, 13 Nov 2016 23:37:49 +0100 Subject: [PATCH] fix reload_random_seed error handling https://github.com/QubesOS/qubes-core-agent-linux/pull/21#pullrequestreview-8302473 --- init/functions | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/init/functions b/init/functions index 5cf08db..07d5eb4 100644 --- a/init/functions +++ b/init/functions @@ -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 }