Improve the OneRNG installation
This commit is contained in:
parent
2acb822170
commit
465e65350e
|
@ -4980,17 +4980,21 @@ function install_onerng {
|
|||
# install the package
|
||||
dpkg -i $ONERNG_PACKAGE
|
||||
|
||||
# check rng-tools configuration
|
||||
if ! grep -q "/dev/$ONERNG_DEVICE" /etc/default/rng-tools; then
|
||||
echo "HRNGDEVICE=/dev/$ONERNG_DEVICE" >> /etc/default/rng-tools
|
||||
systemctl restart rng-tools
|
||||
fi
|
||||
|
||||
# Check that the install worked
|
||||
if [ ! -f /etc/onerng.conf ]; then
|
||||
echo 'OneRNG configuration file not found. The package may not have installed successfully.'
|
||||
exit 42904
|
||||
fi
|
||||
|
||||
dialog --title "OneRNG Device" \
|
||||
--msgbox "Please plug in the OneRNG device" 6 40
|
||||
|
||||
# check rng-tools configuration
|
||||
if ! grep -q "/dev/$ONERNG_DEVICE" /etc/default/rng-tools; then
|
||||
echo "HRNGDEVICE=/dev/$ONERNG_DEVICE" >> /etc/default/rng-tools
|
||||
fi
|
||||
|
||||
systemctl restart rng-tools
|
||||
}
|
||||
|
||||
function random_number_generator {
|
||||
|
|
|
@ -590,7 +590,10 @@ function interactive_configuration {
|
|||
esac
|
||||
case $(cat $data) in
|
||||
2) HWRNG_TYPE="beaglebone";;
|
||||
3) HWRNG_TYPE="onerng";;
|
||||
3) HWRNG_TYPE="onerng"
|
||||
dialog --title "OneRNG Device" \
|
||||
--msgbox "Please ensure that the OneRNG device is disconnected. You can reconnect it later during the installation" 8 60
|
||||
;;
|
||||
255) exit 1;;
|
||||
esac
|
||||
save_configuration_file
|
||||
|
|
Loading…
Reference in New Issue