diff --git a/rc.shutdown b/rc.shutdown index e34d570..ec1bdbe 100755 --- a/rc.shutdown +++ b/rc.shutdown @@ -56,8 +56,7 @@ stat_done run_hook shutdown_postkillall stat_busy "Saving Random Seed" -RANDOM_SEED=/var/lib/misc/random-seed -[ -d $(dirname $RANDOM_SEED) ] || mkdir -p $(dirname $RANDOM_SEED) +RANDOM_SEED=/etc/random-seed : > $RANDOM_SEED /bin/chmod 0600 $RANDOM_SEED POOL_FILE=/proc/sys/kernel/random/poolsize diff --git a/rc.sysinit b/rc.sysinit index c4ebd77..61b24d4 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -136,6 +136,13 @@ if [ "$USELVM" = "yes" -o "$USELVM" = "YES" ]; then fi fi +RANDOM_SEED=/etc/random-seed +if [ -f $RANDOM_SEED ]; then + stat_busy "Initializing Random Seed" + /bin/cat $RANDOM_SEED > /dev/urandom + stat_done +fi + # Set up non-root encrypted partition mappings if [ -f /etc/crypttab -a -n "$(/bin/grep -v ^# /etc/crypttab | /bin/grep -v ^$)" ]; then /sbin/modprobe -q dm-mod 2>/dev/null @@ -303,13 +310,6 @@ if [ -n "$HWCLOCK_PARAMS" ]; then fi stat_done -RANDOM_SEED=/var/lib/misc/random-seed -if [ -f $RANDOM_SEED ]; then - stat_busy "Initializing Random Seed" - /bin/cat $RANDOM_SEED > /dev/urandom - stat_done -fi - stat_busy "Removing Leftover Files" /bin/rm -f /etc/nologin &>/dev/null /bin/rm -f /etc/shutdownpid &>/dev/null