| 
				
			 | 
			
			
				@@ -46,7 +46,7 @@ DOWNLOAD_LINK2="http://ynezz.ibawizard.net/beagleboard/jessie/$DEBIAN_FILE_NAME. 
			 | 
		
	
		
			
			| 
				46
			 | 
			
				46
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				47
			 | 
			
				47
			 | 
			
			
				 function show_help { 
			 | 
		
	
		
			
			| 
				48
			 | 
			
				48
			 | 
			
			
				     echo '' 
			 | 
		
	
		
			
			| 
				49
			 | 
			
				
			 | 
			
			
				-    echo 'freedombone-prep -d [microSD device] --ip [BBB LAN IP address] --iprouter [Router LAN IP address]' 
			 | 
		
	
		
			
			| 
				
			 | 
			
				49
			 | 
			
			
				+    echo 'freedombone-prep -d [microSD device] --ip [BBB LAN IP address] --iprouter [Router LAN IP address] --mount [mount directory]' 
			 | 
		
	
		
			
			| 
				50
			 | 
			
				50
			 | 
			
			
				     echo '' 
			 | 
		
	
		
			
			| 
				51
			 | 
			
				51
			 | 
			
			
				     echo 'See the manpage for more details' 
			 | 
		
	
		
			
			| 
				52
			 | 
			
				52
			 | 
			
			
				     echo '' 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -58,6 +58,12 @@ if [[ $NO_OF_ARGS == 0 ]]; then 
			 | 
		
	
		
			
			| 
				58
			 | 
			
				58
			 | 
			
			
				   exit 0 
			 | 
		
	
		
			
			| 
				59
			 | 
			
				59
			 | 
			
			
				 fi 
			 | 
		
	
		
			
			| 
				60
			 | 
			
				60
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				
			 | 
			
				61
			 | 
			
			
				+if [ ! -d $MICROSD_MOUNT_POINT ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				62
			 | 
			
			
				+    echo "The mount directory $MICROSD_MOUNT_POINT does not exist." 
			 | 
		
	
		
			
			| 
				
			 | 
			
				63
			 | 
			
			
				+    echo 'Use the --mount option to specify where the microSD gets mounted to.' 
			 | 
		
	
		
			
			| 
				
			 | 
			
				64
			 | 
			
			
				+    exit 67563 
			 | 
		
	
		
			
			| 
				
			 | 
			
				65
			 | 
			
			
				+fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				66
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				61
			 | 
			
				67
			 | 
			
			
				 while [[ $# > 1 ]] 
			 | 
		
	
		
			
			| 
				62
			 | 
			
				68
			 | 
			
			
				 do 
			 | 
		
	
		
			
			| 
				63
			 | 
			
				69
			 | 
			
			
				 key="$1" 
			 | 
		
	
	
		
			
			| 
				
			 | 
			
			
				@@ -154,6 +160,16 @@ if [ ! -b ${MICROSD_DRIVE}1 ]; then 
			 | 
		
	
		
			
			| 
				154
			 | 
			
				160
			 | 
			
			
				     fi 
			 | 
		
	
		
			
			| 
				155
			 | 
			
				161
			 | 
			
			
				 fi 
			 | 
		
	
		
			
			| 
				156
			 | 
			
				162
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				
			 | 
			
				163
			 | 
			
			
				+if [ ! -d $MICROSD_MOUNT_POINT/BOOT ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				164
			 | 
			
			
				+    echo "The boot partition $MICROSD_MOUNT_POINT/BOOT was not found." 
			 | 
		
	
		
			
			| 
				
			 | 
			
				165
			 | 
			
			
				+    exit 67857 
			 | 
		
	
		
			
			| 
				
			 | 
			
				166
			 | 
			
			
				+fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				167
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				
			 | 
			
				168
			 | 
			
			
				+if [ ! -d $MICROSD_MOUNT_POINT/rootfs ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				169
			 | 
			
			
				+    echo "The rootfs partition $MICROSD_MOUNT_POINT/rootfs was not found." 
			 | 
		
	
		
			
			| 
				
			 | 
			
				170
			 | 
			
			
				+    exit 65688 
			 | 
		
	
		
			
			| 
				
			 | 
			
				171
			 | 
			
			
				+fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				172
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				157
			 | 
			
				173
			 | 
			
			
				 $SUDO cp $MICROSD_MOUNT_POINT/BOOT/bbb-uEnv.txt $MICROSD_MOUNT_POINT/BOOT/uEnv.txt 
			 | 
		
	
		
			
			| 
				158
			 | 
			
				174
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				159
			 | 
			
				175
			 | 
			
			
				 $SUDO sed -i 's/iface eth0 inet dhcp/iface eth0 inet static/g' $MICROSD_MOUNT_POINT/rootfs/etc/network/interfaces 
			 |