fix: move hosts file inside the docker container #136

This commit is contained in:
Elbek Azimov 2015-10-10 23:28:50 +05:00
parent 8f6ed736fd
commit c8af029948
1 changed files with 2 additions and 0 deletions

View File

@ -38,6 +38,8 @@ module VagrantPlugins
machine.communicate.upload(file, '/tmp/hosts')
if windir
machine.communicate.sudo("#{move_cmd} /tmp/hosts/hosts.#{machine.name} #{realhostfile}")
elsif machine.communicate.test('test -f /.dockerinit')
machine.communicate.sudo("cat /tmp/hosts > #{realhostfile}")
else
machine.communicate.sudo("#{move_cmd} /tmp/hosts #{realhostfile}")
end