File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
lib/vagrant-hostmanager/hosts_file Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -41,11 +41,11 @@ def update_guest(machine)
41
41
42
42
if update_file ( file , machine , false , line_endings )
43
43
# upload modified file and remove temporary file
44
- machine . communicate . upload ( file . to_s , ' /tmp/hosts' )
44
+ machine . communicate . upload ( file . to_s , " /tmp/hosts. #{ machine . name } " )
45
45
if windir
46
- machine . communicate . sudo ( "mv -force /tmp/hosts/hosts .#{ machine . name } #{ realhostfile } " )
46
+ machine . communicate . sudo ( "mv -force /tmp/hosts.#{ machine . name } #{ realhostfile } " )
47
47
else
48
- machine . communicate . sudo ( "cat /tmp/hosts > #{ realhostfile } " )
48
+ machine . communicate . sudo ( "cat /tmp/hosts. #{ machine . name } > #{ realhostfile } && rm /tmp/hosts. #{ machine . name } " )
49
49
end
50
50
end
51
51
You can’t perform that action at this time.
0 commit comments