init.d/urandom.in: drop the use of the psz variable

Since this service is now *bsd only, we don't need to worry about
reading this value from /proc/sys.
This commit is contained in:
William Hubbs 2022-03-30 21:59:44 -05:00
parent 0fb11190fa
commit 96b0c695d9

View File

@ -21,15 +21,9 @@ depend()
save_seed() save_seed()
{ {
local psz=1
if [ -e /proc/sys/kernel/random/poolsize ]; then
: $(( psz = $(cat /proc/sys/kernel/random/poolsize) / 4096 ))
fi
( # sub shell to prevent umask pollution ( # sub shell to prevent umask pollution
umask 077 umask 077
dd if=/dev/urandom of="$urandom_seed" count=${psz} 2>/dev/null dd if=/dev/urandom of="$urandom_seed" count=1 2>/dev/null
) )
} }