vagrant-hostmanager 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,14 +6,20 @@ module VagrantPlugins
|
|
6
6
|
def update_guest(machine)
|
7
7
|
return unless machine.communicate.ready?
|
8
8
|
|
9
|
+
if (machine.communicate.test("uname -s | grep SunOS"))
|
10
|
+
realhostfile = '/etc/inet/hosts'
|
11
|
+
else
|
12
|
+
realhostfile = '/etc/hosts'
|
13
|
+
end
|
14
|
+
|
9
15
|
# download and modify file with Vagrant-managed entries
|
10
16
|
file = @global_env.tmp_path.join("hosts.#{machine.name}")
|
11
|
-
machine.communicate.download(
|
17
|
+
machine.communicate.download(realhostfile, file)
|
12
18
|
update_file(file)
|
13
19
|
|
14
20
|
# upload modified file and remove temporary file
|
15
21
|
machine.communicate.upload(file, '/tmp/hosts')
|
16
|
-
machine.communicate.sudo(
|
22
|
+
machine.communicate.sudo("mv /tmp/hosts #{realhostfile}")
|
17
23
|
# i have no idea if this is a windows competibility issue or not, but sometimes it dosen't work on my machine
|
18
24
|
begin
|
19
25
|
FileUtils.rm(file)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-hostmanager
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-10-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|