Browse Source

Improve the OneRNG installation

Bob Mottram 10 years ago
parent
commit
465e65350e
2 changed files with 14 additions and 7 deletions
  1. 10
    6
      src/freedombone
  2. 4
    1
      src/freedombone-config

+ 10
- 6
src/freedombone View File

4980
   # install the package
4980
   # install the package
4981
   dpkg -i $ONERNG_PACKAGE
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
   # Check that the install worked
4983
   # Check that the install worked
4990
   if [ ! -f /etc/onerng.conf ]; then
4984
   if [ ! -f /etc/onerng.conf ]; then
4991
       echo 'OneRNG configuration file not found. The package may not have installed successfully.'
4985
       echo 'OneRNG configuration file not found. The package may not have installed successfully.'
4992
       exit 42904
4986
       exit 42904
4993
   fi
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
 function random_number_generator {
5000
 function random_number_generator {

+ 4
- 1
src/freedombone-config View File

590
   esac
590
   esac
591
   case $(cat $data) in
591
   case $(cat $data) in
592
       2) HWRNG_TYPE="beaglebone";;
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
       255) exit 1;;
597
       255) exit 1;;
595
   esac
598
   esac
596
   save_configuration_file
599
   save_configuration_file