vagrant-solaris10 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/lib/vagrant-solaris10/cap/change_host_name.rb +1 -1
- data/lib/vagrant-solaris10/cap/mount_nfs_folder.rb +9 -2
- data/lib/vagrant-solaris10/cap/mount_vmware_shared_folder.rb +24 -1
- data/lib/vagrant-solaris10/cap/rsync.rb +2 -2
- data/lib/vagrant-solaris10/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6bb4a7981dd542e30b7121550d1e24f0f008216
|
4
|
+
data.tar.gz: 7dc353140a37270bb448800ee6b77f25031ea34b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a59512d0bb3150998bb9b50f1e5ca12f0ed62189736053bda7aad64af7805e98720799a9487fbd548297d474d99372a5135c2f6c7cf8c384d568bc25de761b38
|
7
|
+
data.tar.gz: c913e18ef822e8259e79524e77086512ad9b7aed820e0a74b15bcae5f85c3f662bc83e5dc9b2dd1888442245ebb095bd62b56ed36ef0316a6db9dcb75e5605f7
|
data/README.md
CHANGED
@@ -21,6 +21,12 @@ Install via Vagrant
|
|
21
21
|
$ vagrant plugin install vagrant-solaris10
|
22
22
|
```
|
23
23
|
|
24
|
+
To install from source code, first build via `rake` and then:
|
25
|
+
|
26
|
+
```zsh
|
27
|
+
$ vagrant plugin install pkg/vagrant-solaris10-x.x.x.gem
|
28
|
+
```
|
29
|
+
|
24
30
|
## Contributing
|
25
31
|
|
26
32
|
1. Fork it ( https://github.com/tnarik/vagrant-solaris10/fork )
|
@@ -9,7 +9,7 @@ module Vagrant
|
|
9
9
|
|
10
10
|
# Only do this if the hostname is not already set
|
11
11
|
machine.communicate.tap do |comm|
|
12
|
-
if !comm.test("
|
12
|
+
if !comm.test("hostname | grep '#{name}", sudo: true))
|
13
13
|
ifconfig = nil
|
14
14
|
# Get ifconfig output
|
15
15
|
comm.execute("ifconfig -a") do |type, data|
|
@@ -21,9 +21,16 @@ module Vagrant
|
|
21
21
|
expanded_guest_path = machine.guest.capability(
|
22
22
|
:shell_expand_guest_path, opts[:guestpath])
|
23
23
|
|
24
|
-
#
|
25
|
-
machine.communicate.
|
24
|
+
# clear prior symlink
|
25
|
+
if machine.communicate.test("test -L \"#{expanded_guest_path}\"", sudo: true)
|
26
|
+
machine.communicate.sudo("rm -f \"#{expanded_guest_path}\"")
|
27
|
+
end
|
26
28
|
|
29
|
+
# Create the folder if doesn't exist
|
30
|
+
if !machine.communicate.test("test -d \"#{expanded_guest_path}\"", sudo: true)
|
31
|
+
machine.communicate.sudo("mkdir -p #{expanded_guest_path}")
|
32
|
+
end
|
33
|
+
|
27
34
|
# Figure out any options
|
28
35
|
mount_opts = ["vers=#{opts[:nfs_version]}"]
|
29
36
|
if opts[:mount_options]
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright (c) 2014 Tnarik Innael - adaptation to Solaris and repackaging
|
1
|
+
# Copyright (c) 2014-2015 Tnarik Innael - adaptation to Solaris and repackaging
|
2
2
|
# Copyright (c) 2013-2014 timsutton/kalmanh/lsimons - from plugins/guests/darwin/cap/mount_vmware_shared_folder.rb
|
3
3
|
module Vagrant
|
4
4
|
module Solaris10
|
@@ -6,7 +6,21 @@ module Vagrant
|
|
6
6
|
class MountVmwareSharedFolder
|
7
7
|
|
8
8
|
def self.mount_vmware_shared_folder(machine, name, guestpath, options)
|
9
|
+
owner = options[:owner]
|
10
|
+
group = options[:group]
|
9
11
|
machine.communicate.tap do |comm|
|
12
|
+
if owner.is_a? Integer
|
13
|
+
mount_uid = owner
|
14
|
+
else
|
15
|
+
mount_uid = "$(/usr/xpg4/bin/id -u #{owner})"
|
16
|
+
end
|
17
|
+
|
18
|
+
if group.is_a? Integer
|
19
|
+
mount_gid = group
|
20
|
+
else
|
21
|
+
mount_gid = "$(/bin/getent group #{group} | cut -d: -f3)"
|
22
|
+
end
|
23
|
+
|
10
24
|
# clear prior symlink
|
11
25
|
if comm.test("test -L \"#{guestpath}\"", sudo: true)
|
12
26
|
comm.sudo("rm -f \"#{guestpath}\"")
|
@@ -17,8 +31,17 @@ module Vagrant
|
|
17
31
|
comm.sudo("rm -Rf \"#{guestpath}\"")
|
18
32
|
end
|
19
33
|
|
34
|
+
# create guest parent folder if doesn't exist
|
35
|
+
parent_guest_path = File.dirname(guestpath)
|
36
|
+
if !comm.test("test -d \"#{parent_guest_path}\"", sudo: true)
|
37
|
+
comm.sudo("mkdir -p \"#{parent_guest_path}\"")
|
38
|
+
end
|
39
|
+
|
20
40
|
# finally make the symlink
|
21
41
|
comm.sudo("ln -s \"/hgfs/#{name}\" \"#{guestpath}\"")
|
42
|
+
|
43
|
+
# Set permissions correctly on the link
|
44
|
+
comm.sudo("chown -h #{mount_uid}:#{mount_gid} \"#{guestpath}\"")
|
22
45
|
end
|
23
46
|
end
|
24
47
|
|
@@ -4,8 +4,8 @@ module Vagrant
|
|
4
4
|
class RSync
|
5
5
|
|
6
6
|
def self.rsync_post(machine, opts)
|
7
|
-
machine.communicate.
|
8
|
-
"
|
7
|
+
machine.communicate.sudo(
|
8
|
+
"find '#{opts[:guestpath]}' '(' ! -user #{opts[:owner]} -o ! -group #{opts[:group]} ')' " +
|
9
9
|
" -exec chown #{opts[:owner]}:#{opts[:group]} {} +")
|
10
10
|
end
|
11
11
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-solaris10
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tnarik Innael
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|