aboutsummaryrefslogtreecommitdiffstats
path: root/src/fripost-partman-udeb
diff options
context:
space:
mode:
Diffstat (limited to 'src/fripost-partman-udeb')
-rw-r--r--src/fripost-partman-udeb/base.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/fripost-partman-udeb/base.sh b/src/fripost-partman-udeb/base.sh
index 0155569..f58d457 100644
--- a/src/fripost-partman-udeb/base.sh
+++ b/src/fripost-partman-udeb/base.sh
@@ -61,14 +61,15 @@ wait_for_device() {
# installer does that already.)
seed_urandom() {
local seed=/var/run/random-seed fifo n records dir
- local poolfile=/proc/sys/kernel/random/poolsize bytes=512
+ local poolfile=/proc/sys/kernel/random/poolsize bits=4096
if [ -f "$seed" ]; then
log "/dev/urandom has already been seeded since start-up"
return 0
fi
- [ -r $poolfile ] && bytes=$(cat $poolfile)
+ [ -r $poolfile ] && bits=$(cat $poolfile)
+ local bytes=$(( $bits / 8 ))
log "Seeding /dev/urandom with $bytes bytes from /dev/random"
db_subst fripost/seed_urandom_progress_title BYTES $bytes
db_progress START 0 $bytes fripost/seed_urandom_progress_title