### END INIT INFO
test -c /dev/urandom || exit 0
+
+RANDOM_SEED_FILE=/var/lib/urandom/random-seed
+
. /etc/default/rcS
case "$1" in
test "$VERBOSE" != no && echo "Initializing random number generator..."
# Load and then save 512 bytes,
# which is the size of the entropy pool
- if test -f /var/lib/urandom/random-seed
+ if test -f "$RANDOM_SEED_FILE"
then
- cat /var/lib/urandom/random-seed >/dev/urandom
+ cat "$RANDOM_SEED_FILE" >/dev/urandom
fi
- rm -f /var/lib/urandom/random-seed
+ rm -f "$RANDOM_SEED_FILE"
umask 077
- dd if=/dev/urandom of=/var/lib/urandom/random-seed count=1 \
+ dd if=/dev/urandom of=$RANDOM_SEED_FILE count=1 \
>/dev/null 2>&1 || echo "urandom start: failed."
umask 022
;;
# see documentation in linux/drivers/char/random.c
test "$VERBOSE" != no && echo "Saving random seed..."
umask 077
- dd if=/dev/urandom of=/var/lib/urandom/random-seed count=1 \
+ dd if=/dev/urandom of=$RANDOM_SEED_FILE count=1 \
>/dev/null 2>&1 || echo "urandom stop: failed."
;;
*)