05-urandom.sh 224 B

12345678910
  1. # shellcheck shell=sh
  2. [ -r /proc/sys/kernel/random/poolsize ] && \
  3. read -r bytes < /proc/sys/kernel/random/poolsize
  4. (
  5. umask 077
  6. dd if=/dev/urandom of="${SEED:-/var/lib/misc/random-seed}" \
  7. count=1 bs="${bytes:-512}"
  8. )