Changed test for windows guest to use the same as the vagrant-windows plugin
This commit is contained in:
parent
c555a98de3
commit
b935e4002f
|
@ -9,14 +9,13 @@ module VagrantPlugins
|
||||||
if (machine.communicate.test("uname -s | grep SunOS"))
|
if (machine.communicate.test("uname -s | grep SunOS"))
|
||||||
realhostfile = '/etc/inet/hosts'
|
realhostfile = '/etc/inet/hosts'
|
||||||
move_cmd = 'mv'
|
move_cmd = 'mv'
|
||||||
elsif (machine.communicate.test("uname -s | grep MINGW32_NT"))
|
elsif (machine.communicate.test("test -d $Env:SystemRoot"))
|
||||||
realhostfile = 'C:\Windows\System32\Drivers\etc\hosts'
|
realhostfile = 'C:\Windows\System32\Drivers\etc\hosts'
|
||||||
move_cmd = 'mv -force'
|
move_cmd = 'mv -force'
|
||||||
else
|
else
|
||||||
realhostfile = '/etc/hosts'
|
realhostfile = '/etc/hosts'
|
||||||
move_cmd = 'mv'
|
move_cmd = 'mv'
|
||||||
end
|
end
|
||||||
|
|
||||||
# download and modify file with Vagrant-managed entries
|
# download and modify file with Vagrant-managed entries
|
||||||
file = @global_env.tmp_path.join("hosts.#{machine.name}")
|
file = @global_env.tmp_path.join("hosts.#{machine.name}")
|
||||||
machine.communicate.download(realhostfile, file)
|
machine.communicate.download(realhostfile, file)
|
||||||
|
|
Loading…
Reference in New Issue