| 
				
			 | 
			
			
				@@ -106,8 +106,9 @@ TLS_TIME_SOURCE2="www.ptb.de" 
			 | 
		
	
		
			
			| 
				106
			 | 
			
				106
			 | 
			
			
				 # See http://rcn-ee.net/deb/jessie-armhf/ 
			 | 
		
	
		
			
			| 
				107
			 | 
			
				107
			 | 
			
			
				 KERNEL_VERSION="v3.15.10-bone8" 
			 | 
		
	
		
			
			| 
				108
			 | 
			
				108
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				109
			 | 
			
				
			 | 
			
			
				-# Whether or not to use the beaglebone's hardware random number generator 
			 | 
		
	
		
			
			| 
				110
			 | 
			
				
			 | 
			
			
				-USE_HWRNG="yes" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				109
			 | 
			
			
				+# The type of hardware random number generator being used 
			 | 
		
	
		
			
			| 
				
			 | 
			
				110
			 | 
			
			
				+# This can be empty, "beaglebone" or "onerng" 
			 | 
		
	
		
			
			| 
				
			 | 
			
				111
			 | 
			
			
				+HWRNG_TYPE= 
			 | 
		
	
		
			
			| 
				111
			 | 
			
				112
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				112
			 | 
			
				113
			 | 
			
			
				 # Whether this system is being installed within a docker container 
			 | 
		
	
		
			
			| 
				113
			 | 
			
				114
			 | 
			
			
				 INSTALLED_WITHIN_DOCKER="no" 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -694,6 +695,9 @@ function read_configuration { 
			 | 
		
	
		
			
			| 
				694
			 | 
			
				695
			 | 
			
			
				   fi 
			 | 
		
	
		
			
			| 
				695
			 | 
			
				696
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				696
			 | 
			
				697
			 | 
			
			
				   if [ -f $CONFIGURATION_FILE ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				698
			 | 
			
			
				+      if grep -q "HWRNG_TYPE" $CONFIGURATION_FILE; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				699
			 | 
			
			
				+          HWRNG_TYPE=$(grep "HWRNG_TYPE" $CONFIGURATION_FILE | awk -F '=' '{print $2}') 
			 | 
		
	
		
			
			| 
				
			 | 
			
				700
			 | 
			
			
				+      fi 
			 | 
		
	
		
			
			| 
				697
			 | 
			
				701
			 | 
			
			
				       if grep -q "MEDIAGOBLIN_DOMAIN_NAME" $CONFIGURATION_FILE; then 
			 | 
		
	
		
			
			| 
				698
			 | 
			
				702
			 | 
			
			
				           MEDIAGOBLIN_DOMAIN_NAME=$(grep "MEDIAGOBLIN_DOMAIN_NAME" $CONFIGURATION_FILE | awk -F '=' '{print $2}') 
			 | 
		
	
		
			
			| 
				699
			 | 
			
				703
			 | 
			
			
				       fi 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -4726,6 +4730,10 @@ function enable_zram { 
			 | 
		
	
		
			
			| 
				4726
			 | 
			
				4730
			 | 
			
			
				   echo 'enable_zram' >> $COMPLETION_FILE 
			 | 
		
	
		
			
			| 
				4727
			 | 
			
				4731
			 | 
			
			
				 } 
			 | 
		
	
		
			
			| 
				4728
			 | 
			
				4732
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				
			 | 
			
				4733
			 | 
			
			
				+function install_onerng { 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4734
			 | 
			
			
				+  # TODO 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4735
			 | 
			
			
				+} 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4736
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				4729
			 | 
			
				4737
			 | 
			
			
				 function random_number_generator { 
			 | 
		
	
		
			
			| 
				4730
			 | 
			
				4738
			 | 
			
			
				   if grep -Fxq "random_number_generator" $COMPLETION_FILE; then 
			 | 
		
	
		
			
			| 
				4731
			 | 
			
				4739
			 | 
			
			
				       return 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -4742,12 +4750,20 @@ function random_number_generator { 
			 | 
		
	
		
			
			| 
				4742
			 | 
			
				4750
			 | 
			
			
				       # generator of the host system 
			 | 
		
	
		
			
			| 
				4743
			 | 
			
				4751
			 | 
			
			
				       return 
			 | 
		
	
		
			
			| 
				4744
			 | 
			
				4752
			 | 
			
			
				   fi 
			 | 
		
	
		
			
			| 
				4745
			 | 
			
				
			 | 
			
			
				-  if [[ $USE_HWRNG == "yes" ]]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4753
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4754
			 | 
			
			
				+  case $HWRNG_TYPE in 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4755
			 | 
			
			
				+    beaglebone) 
			 | 
		
	
		
			
			| 
				4746
			 | 
			
				4756
			 | 
			
			
				     apt-get -y install rng-tools 
			 | 
		
	
		
			
			| 
				4747
			 | 
			
				4757
			 | 
			
			
				     sed -i 's|#HRNGDEVICE=/dev/hwrng|HRNGDEVICE=/dev/hwrng|g' /etc/default/rng-tools 
			 | 
		
	
		
			
			| 
				4748
			 | 
			
				
			 | 
			
			
				-  else 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4758
			 | 
			
			
				+    ;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4759
			 | 
			
			
				+    onerng) 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4760
			 | 
			
			
				+    install_onerng 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4761
			 | 
			
			
				+    ;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4762
			 | 
			
			
				+    *) 
			 | 
		
	
		
			
			| 
				4749
			 | 
			
				4763
			 | 
			
			
				     apt-get -y install haveged 
			 | 
		
	
		
			
			| 
				4750
			 | 
			
				
			 | 
			
			
				-  fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4764
			 | 
			
			
				+    ;; 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4765
			 | 
			
			
				+  esac 
			 | 
		
	
		
			
			| 
				
			 | 
			
				4766
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				4751
			 | 
			
				4767
			 | 
			
			
				   echo 'random_number_generator' >> $COMPLETION_FILE 
			 | 
		
	
		
			
			| 
				4752
			 | 
			
				4768
			 | 
			
			
				 } 
			 | 
		
	
		
			
			| 
				4753
			 | 
			
				4769
			 | 
			
			
				  
			 |