diff options
author | Cem Keylan <cem@ckyln.com> | 2020-01-24 09:13:01 +0300 |
---|---|---|
committer | Cem Keylan <cem@ckyln.com> | 2020-01-24 09:13:01 +0300 |
commit | 917a427e40b3c21783ae6aed73117a22bd61cfc0 (patch) | |
tree | d9d1021d6fc50b7fc655a9c1d8c56b7aaae71c56 | |
parent | 4895c4cc0518339d45ccf1d6e9843a2ff9f9ff32 (diff) | |
download | init-917a427e40b3c21783ae6aed73117a22bd61cfc0.tar.gz |
random seed runs after pseudo filesystems
-rwxr-xr-x | rc.boot | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -29,6 +29,17 @@ out "Mounting pseudo filesystems..."; { mnt /dev/shm -o mode=1777,nosuid,nodev -nt tmpfs shm } +out "Seeding random..."; { + if [ -f /var/random.seed ]; then + cat /var/random.seed > /dev/urandom + else + out "This may hang." + out "Mash the keyboard to generate entropy..." + + dd count=1 bs=512 if=/dev/random of=/var/random.seed + fi +} + out "Setting dmesg level..."; { [ -n "$dmesg_level" ] && dmesg -n$dmesg_level } @@ -110,16 +121,6 @@ out "Enabling swap..."; { swapon -a || emergency_shell } -out "Seeding random..."; { - if [ -f /var/random.seed ]; then - cat /var/random.seed > /dev/urandom - else - out "This may hang." - out "Mash the keyboard to generate entropy..." - - dd count=1 bs=512 if=/dev/random of=/var/random.seed - fi -} out "Setting up loopback..."; { ip link set up dev lo |