aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCem Keylan <cem@ckyln.com>2020-01-24 09:13:01 +0300
committerCem Keylan <cem@ckyln.com>2020-01-24 09:13:01 +0300
commit917a427e40b3c21783ae6aed73117a22bd61cfc0 (patch)
treed9d1021d6fc50b7fc655a9c1d8c56b7aaae71c56
parent4895c4cc0518339d45ccf1d6e9843a2ff9f9ff32 (diff)
downloadinit-917a427e40b3c21783ae6aed73117a22bd61cfc0.tar.gz
random seed runs after pseudo filesystems
-rwxr-xr-xrc.boot21
1 files changed, 11 insertions, 10 deletions
diff --git a/rc.boot b/rc.boot
index 7b5f8e3..a11b8be 100755
--- a/rc.boot
+++ b/rc.boot
@@ -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