If /dev/hwrng exists then set the hrng type accordingly

This commit is contained in:
Bob Mottram 2015-11-30 16:12:48 +00:00
parent f46e2358d7
commit a64e26b998
1 changed files with 7 additions and 0 deletions

View File

@ -6354,6 +6354,13 @@ function random_number_generator {
return return
fi fi
# if the hrng type has not been set but /dev/hwrng is detected
if [[ $HWRNG_TYPE != "beaglebone" ]]; then
if [ -e /dev/hwrng ]; then
HWRNG_TYPE="beaglebone"
fi
fi
case $HWRNG_TYPE in case $HWRNG_TYPE in
beaglebone) beaglebone)
apt-get -y install rng-tools apt-get -y install rng-tools