mirror of
				https://github.com/oSoWoSo/DistroHopper.git
				synced 2024-08-14 22:46:53 +00:00 
			
		
		
		
	Added Basic SMB Managment (#43)
Co-authored-by: Sec Scout <secscout@localhost.localdomain>
This commit is contained in:
		
							parent
							
								
									4aa38ad8f9
								
							
						
					
					
						commit
						628d1ee088
					
				
					 2 changed files with 10 additions and 2 deletions
				
			
		|  | @ -270,6 +270,7 @@ You can also pass optional parameters | |||
|   --snapshot info         : Show disk/snapshot info. | ||||
|   --status-quo            : Do not commit any changes to disk/snapshot. | ||||
|   --fullscreen            : Starts VM in full screen mode (Ctl+Alt+f to exit)" | ||||
|   --no-smb                : Do not expose the home directory via SMB. | ||||
| ``` | ||||
| 
 | ||||
| ## TODO | ||||
|  | @ -285,3 +286,4 @@ You can also pass optional parameters | |||
|   - [x] Improve stdout presentation | ||||
|   - [x] Make disk image size configurable | ||||
|   - [ ] [Add Faux OEM](# https://code.launchpad.net/~ubuntu-installer/ubiquity/+git/ubiquity/+merge/379899) | ||||
|   - [x] Improve SMB Management | ||||
|  |  | |||
							
								
								
									
										10
									
								
								quickemu
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								quickemu
									
										
									
									
									
								
							|  | @ -353,13 +353,15 @@ function vm_boot() { | |||
|   # Set the hostname of the VM | ||||
|   local NET="user,hostname=${VMNAME}" | ||||
| 
 | ||||
|   # If smbd is available, export $HOME to the guest via samba | ||||
|   if [ -e "${VIRGIL_PATH}/usr/sbin/smbd" ]; then | ||||
|   # If smbd is available, and --no-smb is not set, export $HOME to the guest via samba | ||||
|   if [[ -e "${VIRGIL_PATH}/usr/sbin/smbd" && -z ${NO_SMB} ]]; then | ||||
|       NET="${NET},smb=${HOME}" | ||||
|   fi | ||||
| 
 | ||||
|   if [[ ${NET} == *"smb"* ]]; then | ||||
|     echo " - smbd:     ${HOME} will be exported to the guest via smb://10.0.2.4/qemu" | ||||
|   elif  [[ ${NO_SMB} -eq 1 ]]; then | ||||
|     echo " - smbd:     ${HOME} will not be exported to the guest. '--no-smb' is set." | ||||
|   else | ||||
|     echo " - smbd:     ${HOME} will not be exported to the guest. 'smbd' not found." | ||||
|   fi | ||||
|  | @ -523,6 +525,7 @@ function usage() { | |||
|   echo "  --status-quo            : Do not commit any changes to disk/snapshot." | ||||
|   echo "  --system-qemu           : Use system install of qemu." | ||||
|   echo "  --fullscreen            : Starts VM in full screen mode" | ||||
|   echo "  --no-smb                : Do not expose the home directory via SMB." | ||||
|   exit 1 | ||||
| } | ||||
| 
 | ||||
|  | @ -594,6 +597,9 @@ else | |||
|           -system-qemu|--system-qemu) | ||||
|             SYSTEM_QEMU=1 | ||||
|             shift;; | ||||
|           -no-smb|--no-smb) | ||||
|             NO_SMB=1 | ||||
|             shift;; | ||||
|           -h|--h|-help|--help) | ||||
|             usage;; | ||||
|           *) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue