aboutsummaryrefslogtreecommitdiff
path: root/rc.sysinit
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2009-02-11 22:06:13 +0100
committerThomas Bächler <thomas@archlinux.org>2009-02-11 22:06:13 +0100
commit21f528419f945f0d2f867ffa55553b4d5da7f4b8 (patch)
treec030e11f2da31bdb5e4780a3c96503eaa84de848 /rc.sysinit
parente932c3406acf105c99e159ca0610768fbfb49b1a (diff)
downloadinitscripts-21f528419f945f0d2f867ffa55553b4d5da7f4b8.tar.xz
Fix bug #13205: better random-seed entropy
- For the random-seed file location to be more "FHS compliant" is better to put in /var/lib/misc/random-seed (Variable state information, that persists after reboot) than the /var/run/random-seed (Run-time variable data, that not necessarily persists after reboot) for example with /var/run mounted as TMPFS. - The random-seed file permision should be "0600" not "0644" - The size of random-seed acording to random(4) manpage should be the size specified in "/proc/sys/kernel/random/poolsize" in other case 512 bytes.
Diffstat (limited to 'rc.sysinit')
-rwxr-xr-xrc.sysinit5
1 files changed, 3 insertions, 2 deletions
diff --git a/rc.sysinit b/rc.sysinit
index 7f22e88..d4d3249 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -320,9 +320,10 @@ fi
/sbin/hwclock $HWCLOCK_PARAMS
stat_done
-if [ -f /var/run/random-seed ]; then
+RANDOM_SEED=/var/lib/misc/random-seed
+if [ -f $RANDOM_SEED ]; then
stat_busy "Initializing Random Seed"
- /bin/cat /var/run/random-seed >/dev/urandom
+ /bin/cat $RANDOM_SEED > /dev/urandom
stat_done
fi