Skip to content

Commit

Permalink
krng: use kernel entropy if no random-seed is stored.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arne Fitzenreiter committed Feb 2, 2014
1 parent c924c7d commit 1c72742
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/initscripts/init.d/random
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ case "$1" in
boot_mesg "Initializing kernel random number generator..."
if [ -f /var/tmp/random-seed ]; then
/bin/cat /var/tmp/random-seed >/dev/urandom
else
/bin/dd if=/dev/random of=/dev/urandom \
count=1 &>/dev/null
fi
/bin/dd if=/dev/urandom of=/var/tmp/random-seed \
count=1 &>/dev/null
Expand Down

0 comments on commit 1c72742

Please sign in to comment.