adding solairs support
This commit is contained in:
		
							parent
							
								
									86f4d73387
								
							
						
					
					
						commit
						b281681b11
					
				|  | @ -6,14 +6,20 @@ module VagrantPlugins | |||
|       def update_guest(machine) | ||||
|         return unless machine.communicate.ready? | ||||
| 
 | ||||
|         if (machine.communicate.test("uname -s | grep SunOS")) | ||||
|           realhostfile = '/etc/inet/hosts' | ||||
|         else  | ||||
|           realhostfile = '/etc/hosts' | ||||
|         end | ||||
| 
 | ||||
|         # download and modify file with Vagrant-managed entries | ||||
|         file = @global_env.tmp_path.join("hosts.#{machine.name}") | ||||
|         machine.communicate.download('/etc/hosts', file) | ||||
|         machine.communicate.download(realhostfile, file) | ||||
|         update_file(file) | ||||
| 
 | ||||
|         # upload modified file and remove temporary file | ||||
|         machine.communicate.upload(file, '/tmp/hosts') | ||||
|         machine.communicate.sudo('mv /tmp/hosts /etc/hosts') | ||||
|         machine.communicate.sudo("mv /tmp/hosts #{realhostfile}") | ||||
|         # i have no idea if this is a windows competibility issue or not, but sometimes it dosen't work on my machine | ||||
|         begin | ||||
|           FileUtils.rm(file)  | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Chris Liles
						Chris Liles