mirror of
				https://github.com/oSoWoSo/DistroHopper.git
				synced 2024-08-14 22:46:53 +00:00 
			
		
		
		
	Use a variable for the virtio-9p tag and alert permission fix for macOS
This commit is contained in:
		
							parent
							
								
									88cd13bd11
								
							
						
					
					
						commit
						165e615a41
					
				
					 1 changed files with 12 additions and 4 deletions
				
			
		
							
								
								
									
										16
									
								
								quickemu
									
										
									
									
									
								
							
							
						
						
									
										16
									
								
								quickemu
									
										
									
									
									
								
							|  | @ -469,13 +469,17 @@ function vm_boot() { | ||||||
|     fi |     fi | ||||||
| 
 | 
 | ||||||
|     if [ "${guest_os}" != "windows" ]; then |     if [ "${guest_os}" != "windows" ]; then | ||||||
|       echo -n " - 9P:       ${PUBLIC} via: " |       echo -n " - 9P:       On guest: " | ||||||
|       if [ "${guest_os}" == "linux" ]; then |       if [ "${guest_os}" == "linux" ]; then | ||||||
|         echo "sudo mount -t 9p -o trans=virtio,version=9p2000.L,msize=104857600 ${USER}-public ~/Public" |         echo "sudo mount -t 9p -o trans=virtio,version=9p2000.L,msize=104857600 ${PUBLIC_TAG} ~/Public" | ||||||
|       elif [ "${guest_os}" == "macos" ]; then |       elif [ "${guest_os}" == "macos" ]; then | ||||||
|         # PUBLICSHARE needs to be world writeable for seamless integration with |         # PUBLICSHARE needs to be world writeable for seamless integration with | ||||||
|         # macOS. Test if it is is world writeable, and prompt what to do if not. |         # macOS. Test if it is is world writeable, and prompt what to do if not. | ||||||
|         echo "sudo mount_9p ${USER}-public" |         echo "sudo mount_9p ${PUBLIC_TAG}" | ||||||
|  |         if [ -n "${PUBLIC}" ] && [ "${PUBLIC_PERMS}" != "drwxrwxrwx" ]; then | ||||||
|  |           echo " - 9P:       On host:  chmod 777 ${PUBLIC}" | ||||||
|  |           echo "             Required for macOS integration 👆" | ||||||
|  |         fi | ||||||
|       fi |       fi | ||||||
|     fi |     fi | ||||||
|   fi |   fi | ||||||
|  | @ -581,7 +585,7 @@ function vm_boot() { | ||||||
|   if [ "${guest_os}" != "windows" ]; then |   if [ "${guest_os}" != "windows" ]; then | ||||||
|       # shellcheck disable=SC2054 |       # shellcheck disable=SC2054 | ||||||
|       args+=(-fsdev local,id=fsdev0,path="${PUBLIC}",security_model=mapped-xattr |       args+=(-fsdev local,id=fsdev0,path="${PUBLIC}",security_model=mapped-xattr | ||||||
|              -device virtio-9p-pci,fsdev=fsdev0,mount_tag="${USER}-public") |              -device virtio-9p-pci,fsdev=fsdev0,mount_tag="${PUBLIC_TAG}") | ||||||
|   fi |   fi | ||||||
| 
 | 
 | ||||||
|   if [ -n "${USB_PASSTHROUGH}" ]; then |   if [ -n "${USB_PASSTHROUGH}" ]; then | ||||||
|  | @ -661,6 +665,8 @@ FULLSCREEN="" | ||||||
| FULLSPICY="" | FULLSPICY="" | ||||||
| OUTPUT="sdl" | OUTPUT="sdl" | ||||||
| PUBLIC="" | PUBLIC="" | ||||||
|  | PUBLIC_PERMS="" | ||||||
|  | PUBLIC_TAG="" | ||||||
| SCREEN="" | SCREEN="" | ||||||
| SHORTCUT=0 | SHORTCUT=0 | ||||||
| SNAPSHOT_ACTION="" | SNAPSHOT_ACTION="" | ||||||
|  | @ -680,6 +686,8 @@ if [ "${PUBLIC}" != ${HOME} ]; then | ||||||
|   if [ ! -d "${PUBLIC}" ]; then |   if [ ! -d "${PUBLIC}" ]; then | ||||||
|     mkdir -p "${PUBLIC}" |     mkdir -p "${PUBLIC}" | ||||||
|   fi |   fi | ||||||
|  |   PUBLIC_TAG=$(basename ${PUBLIC})-${USER,,} | ||||||
|  |   PUBLIC_PERMS=$(ls -ld ${PUBLIC} | cut -d' ' -f1) | ||||||
| else | else | ||||||
|   PUBLIC="" |   PUBLIC="" | ||||||
| fi | fi | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue