Improve the OneRNG installation
This commit is contained in:
parent
2acb822170
commit
465e65350e
|
@ -4980,17 +4980,21 @@ function install_onerng {
|
||||||
# install the package
|
# install the package
|
||||||
dpkg -i $ONERNG_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
|
# Check that the install worked
|
||||||
if [ ! -f /etc/onerng.conf ]; then
|
if [ ! -f /etc/onerng.conf ]; then
|
||||||
echo 'OneRNG configuration file not found. The package may not have installed successfully.'
|
echo 'OneRNG configuration file not found. The package may not have installed successfully.'
|
||||||
exit 42904
|
exit 42904
|
||||||
fi
|
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 {
|
function random_number_generator {
|
||||||
|
|
|
@ -590,7 +590,10 @@ function interactive_configuration {
|
||||||
esac
|
esac
|
||||||
case $(cat $data) in
|
case $(cat $data) in
|
||||||
2) HWRNG_TYPE="beaglebone";;
|
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;;
|
255) exit 1;;
|
||||||
esac
|
esac
|
||||||
save_configuration_file
|
save_configuration_file
|
||||||
|
|
Loading…
Reference in New Issue