mirror of
				https://github.com/oSoWoSo/DistroHopper.git
				synced 2024-08-14 22:46:53 +00:00 
			
		
		
		
	Add ports file. Close #156
This commit is contained in:
		
							parent
							
								
									2c513a1823
								
							
						
					
					
						commit
						4003144cf6
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		
							
								
								
									
										4
									
								
								quickemu
									
										
									
									
									
								
							
							
						
						
									
										4
									
								
								quickemu
									
										
									
									
									
								
							|  | @ -692,10 +692,13 @@ function vm_boot() { | ||||||
|   # Set the hostname of the VM |   # Set the hostname of the VM | ||||||
|   local NET="user,hostname=${VMNAME}" |   local NET="user,hostname=${VMNAME}" | ||||||
| 
 | 
 | ||||||
|  |   echo -n "" > "${VMDIR}/${VMNAME}.ports" | ||||||
|  | 
 | ||||||
|   # Find a free port to expose ssh to the guest |   # Find a free port to expose ssh to the guest | ||||||
|   local SSH_PORT="" |   local SSH_PORT="" | ||||||
|   SSH_PORT=$(get_port 22220 9) |   SSH_PORT=$(get_port 22220 9) | ||||||
|   if [ -n "${SSH_PORT}" ]; then |   if [ -n "${SSH_PORT}" ]; then | ||||||
|  |     echo "ssh,${SSH_PORT}" >> "${VMDIR}/${VMNAME}.ports" | ||||||
|     NET="${NET},hostfwd=tcp::${SSH_PORT}-:22" |     NET="${NET},hostfwd=tcp::${SSH_PORT}-:22" | ||||||
|     echo " - ssh:      On host:  ssh user@localhost -p ${SSH_PORT}" |     echo " - ssh:      On host:  ssh user@localhost -p ${SSH_PORT}" | ||||||
|   else |   else | ||||||
|  | @ -727,6 +730,7 @@ function vm_boot() { | ||||||
|     if [ "${OUTPUT}" == "spice-app" ]; then |     if [ "${OUTPUT}" == "spice-app" ]; then | ||||||
|       echo " - SPICE:    Enabled" |       echo " - SPICE:    Enabled" | ||||||
|     else |     else | ||||||
|  |       echo "spice,${SPICE_PORT}" >> "${VMDIR}/${VMNAME}.ports" | ||||||
|       echo -n " - SPICE:    On host:  spicy --title \"${VMNAME}\" --port ${SPICE_PORT}" |       echo -n " - SPICE:    On host:  spicy --title \"${VMNAME}\" --port ${SPICE_PORT}" | ||||||
|       if [ "${guest_os}" != "macos" ] && [ -n "${PUBLIC}" ]; then |       if [ "${guest_os}" != "macos" ] && [ -n "${PUBLIC}" ]; then | ||||||
|         echo -n " --spice-shared-dir ${PUBLIC}" |         echo -n " --spice-shared-dir ${PUBLIC}" | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue