Quellcode durchsuchen

Improve the OneRNG installation

Bob Mottram vor 10 Jahren
Ursprung
Commit
465e65350e
2 geänderte Dateien mit 14 neuen und 7 gelöschten Zeilen
  1. 10
    6
      src/freedombone
  2. 4
    1
      src/freedombone-config

+ 10
- 6
src/freedombone Datei anzeigen

@@ -4980,17 +4980,21 @@ function install_onerng {
4980 4980
   # install the package
4981 4981
   dpkg -i $ONERNG_PACKAGE
4982 4982
 
4983
-  # check rng-tools configuration
4984
-  if ! grep -q "/dev/$ONERNG_DEVICE" /etc/default/rng-tools; then
4985
-      echo "HRNGDEVICE=/dev/$ONERNG_DEVICE" >> /etc/default/rng-tools
4986
-      systemctl restart rng-tools
4987
-  fi
4988
-
4989 4983
   # Check that the install worked
4990 4984
   if [ ! -f /etc/onerng.conf ]; then
4991 4985
       echo 'OneRNG configuration file not found. The package may not have installed successfully.'
4992 4986
       exit 42904
4993 4987
   fi
4988
+
4989
+  dialog --title "OneRNG Device" \
4990
+         --msgbox "Please plug in the OneRNG device" 6 40
4991
+
4992
+  # check rng-tools configuration
4993
+  if ! grep -q "/dev/$ONERNG_DEVICE" /etc/default/rng-tools; then
4994
+      echo "HRNGDEVICE=/dev/$ONERNG_DEVICE" >> /etc/default/rng-tools
4995
+  fi
4996
+
4997
+  systemctl restart rng-tools
4994 4998
 }
4995 4999
 
4996 5000
 function random_number_generator {

+ 4
- 1
src/freedombone-config Datei anzeigen

@@ -590,7 +590,10 @@ function interactive_configuration {
590 590
   esac
591 591
   case $(cat $data) in
592 592
       2) HWRNG_TYPE="beaglebone";;
593
-      3) HWRNG_TYPE="onerng";;
593
+      3) HWRNG_TYPE="onerng"
594
+         dialog --title "OneRNG Device" \
595
+                --msgbox "Please ensure that the OneRNG device is disconnected. You can reconnect it later during the installation" 8 60
596
+         ;;
594 597
       255) exit 1;;
595 598
   esac
596 599
   save_configuration_file