mirror of
				https://github.com/iiab/iiab.git
				synced 2025-03-09 15:40:17 +00:00 
			
		
		
		
	if version_gt $CURRENT_KERN $OLD_RPI_KERN ; then
This commit is contained in:
		
							parent
							
								
									c63f4f671f
								
							
						
					
					
						commit
						50cf4c44ff
					
				
					 1 changed files with 12 additions and 10 deletions
				
			
		
							
								
								
									
										22
									
								
								iiab-install
									
										
									
									
									
								
							
							
						
						
									
										22
									
								
								iiab-install
									
										
									
									
									
								
							|  | @ -10,25 +10,27 @@ CWD=`pwd` | |||
| OS=`grep ^ID= /etc/*release|cut -d= -f2` | ||||
| OS=${OS//\"/} | ||||
| 
 | ||||
| function version_gt() { [ "$(printf '%s\n' "$@" | sort -V | head -1)" != "$1" ]; } | ||||
| 
 | ||||
| export ANSIBLE_LOG_PATH="$CWD/iiab-install.log" | ||||
| 
 | ||||
| if [ ! -f $PLAYBOOK ]; then | ||||
|     echo "IIAB Playbook not found." | ||||
|     echo "Please run this command from /opt/iiab/iiab (top level of the git repo)." | ||||
|     echo "Please run this command from the top level of the git repo." | ||||
|     echo "Exiting." | ||||
|     exit 1 | ||||
| fi | ||||
| 
 | ||||
| if [ $OS == "raspbian" ]; then | ||||
|     echo "Found Raspbian" | ||||
|     ABORT=`uname -a | grep $OLD_RPI_KERN | wc -l` | ||||
|     if [ "$ABORT" == 1 ]; then | ||||
| 	echo "Kernel "$OLD_RPI_KERN" is obsolete. Before running './iiab-install' you first need" | ||||
| 	echo "to update your system with 'apt update' then 'apt dist-upgrade' then reboot." | ||||
|     CURRENT_KERN=`uname -r` | ||||
|     if version_gt $CURRENT_KERN $OLD_RPI_KERN ; then | ||||
|     	echo "Kernel looks ok - continuing" | ||||
|     else | ||||
| 	echo "Kernel "$OLD_RPI_KERN" is obsolete. Before running './iiab-install' you first" | ||||
| 	echo "need to update your system with 'apt update' then 'apt dist-upgrade' then reboot." | ||||
| 	echo "INSTALL INSTRUCTIONS: https://github.com/iiab/iiab/wiki/IIAB-Installation" | ||||
| 	exit 1 | ||||
|     else | ||||
| 	echo "Kernel looks ok - continuing" | ||||
|     fi | ||||
| fi | ||||
| 
 | ||||
|  | @ -58,8 +60,8 @@ else | |||
|         elif [ $STAGE == 9 ]; then | ||||
|             # place keeper add read response | ||||
|             # "offer 'Y' or stage number dialog box option to override" | ||||
|             echo "'iiab-install' has already been completed." | ||||
|             echo "Use --debug to override." | ||||
|             echo "'iiab-install' has already been completed" | ||||
|             echo "use --debug to override " | ||||
|             #echo "In demo mode not preventing second run" | ||||
|             echo "Exiting." | ||||
|             exit 1 | ||||
|  | @ -83,6 +85,6 @@ if [ ! -f ./vars/local_vars.yml ]; then | |||
|     esac | ||||
| fi | ||||
| 
 | ||||
| echo "Running local playbooks!" | ||||
| echo "Running local playbooks! " | ||||
| ansible -m setup -i $INVENTORY localhost --connection=local >> /dev/null | ||||
| ansible-playbook -i $INVENTORY $PLAYBOOK ${ARGS} --connection=local | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue