mirror of
				https://github.com/oSoWoSo/DistroHopper.git
				synced 2024-08-14 22:46:53 +00:00 
			
		
		
		
	Catch disk image creation errors
This commit is contained in:
		
							parent
							
								
									3b5fdcb6ea
								
							
						
					
					
						commit
						01688b3ab5
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		|  | @ -56,6 +56,10 @@ function vm_boot() { | ||||||
|   if [ ! -f "${disk_img}" ]; then |   if [ ! -f "${disk_img}" ]; then | ||||||
|     # If there is no disk image, create a new image. |     # If there is no disk image, create a new image. | ||||||
|     qemu-img create -q -f qcow2 "${disk_img}" "${disk}" |     qemu-img create -q -f qcow2 "${disk_img}" "${disk}" | ||||||
|  |     if [ $? -ne 0 ]; then | ||||||
|  |       echo "ERROR! Failed to create ${disk_img} of ${disk}. Stopping here." | ||||||
|  |       exit 1 | ||||||
|  |     fi | ||||||
|     echo " - ISO:      ${iso}" |     echo " - ISO:      ${iso}" | ||||||
|   else |   else | ||||||
|     # If there is a disk image, do not boot from the iso |     # If there is a disk image, do not boot from the iso | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue