From 0566391df8c9c93f75ad99d94c8a19abe379908b Mon Sep 17 00:00:00 2001 From: Cameron Nemo Date: Fri, 28 Sep 2018 11:19:29 -0700 Subject: urandom: don't seed/store in containers --- 3 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to '3') diff --git a/3 b/3 index 42d6c22..20d7c99 100755 --- a/3 +++ b/3 @@ -18,8 +18,10 @@ sv exit /var/service/* [ -x /etc/rc.shutdown ] && /etc/rc.shutdown -msg "Saving random seed..." -( umask 077; bytes=$(cat /proc/sys/kernel/random/poolsize) || bytes=512; dd if=/dev/urandom of=/var/lib/random-seed count=1 bs=$bytes >/dev/null 2>&1 ) +if [ -z "$VIRTUALIZATION" ]; then + msg "Saving random seed..." + ( umask 077; bytes=$(cat /proc/sys/kernel/random/poolsize) || bytes=512; dd if=/dev/urandom of=/var/lib/random-seed count=1 bs=$bytes >/dev/null 2>&1 ) +fi if [ -z "$VIRTUALIZATION" -a -n "$HARDWARECLOCK" ]; then hwclock --systohc ${HARDWARECLOCK:+--$(echo $HARDWARECLOCK |tr A-Z a-z)} -- cgit 1.4.1