nfsadmin 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/bin/nfsadmin +5 -1
- data/lib/nfsadmin/tasks.rb +2 -1
- data/lib/nfsadmin/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: 2bb7c6fd8eaae9ef79536fc3c84d5a7428e6bd9d
|
4
|
+
data.tar.gz: 3e502c1e4e139f116fd2be4a9e2375c9208e4f1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fb0999d0fa007ff68c60c38e4d5df91eb08d7152a3aac8b29b816807c2dc2808827e5ae8ef5ee862761ac86b4659f0d8ce6a7e8c6ad531a0c146697f732b340
|
7
|
+
data.tar.gz: 8f83ac71bf2286f53a660cbd59a08ef6cee65f8935e32efe6774014ca521b1b42c8d2d5e19f0b4c3e22cd4ca480358bf2cbcd1560e9e11c0eb32e1f40c88736f
|
data/Gemfile.lock
CHANGED
data/bin/nfsadmin
CHANGED
@@ -38,8 +38,12 @@ command :export do |c|
|
|
38
38
|
add.flag [:o, :options]
|
39
39
|
add.desc 'This option forces the location to be created'
|
40
40
|
add.switch [:c, :create]
|
41
|
+
add.desc 'OS user that should own the created location'
|
42
|
+
add.flag [:u, :user]
|
43
|
+
add.desc 'OS group that should own the created location'
|
44
|
+
add.flag [:g, :group]
|
41
45
|
add.action do |global_options,options,args|
|
42
|
-
Nfsadmin::Tasks.create_share(global_options[:c], options[:l], options[:a], options[:o], options[:c])
|
46
|
+
Nfsadmin::Tasks.create_share(global_options[:c], options[:l], options[:a], options[:o], options[:c], options[:u], options[:g])
|
43
47
|
end
|
44
48
|
end
|
45
49
|
|
data/lib/nfsadmin/tasks.rb
CHANGED
@@ -85,7 +85,7 @@ module Nfsadmin
|
|
85
85
|
end
|
86
86
|
end
|
87
87
|
|
88
|
-
def self.create_share(exportsfile, location, address, options, createlocation)
|
88
|
+
def self.create_share(exportsfile, location, address, options, createlocation, user, group)
|
89
89
|
if location.nil?
|
90
90
|
fail 'Location must be specified'
|
91
91
|
else
|
@@ -99,6 +99,7 @@ module Nfsadmin
|
|
99
99
|
end
|
100
100
|
if createlocation
|
101
101
|
FileUtils::mkdir_p location unless File.directory?(location)
|
102
|
+
FileUtils::chown user, group, location unless user.nil? or group.nil?
|
102
103
|
end
|
103
104
|
share = { :location => location,
|
104
105
|
:acl => [{
|
data/lib/nfsadmin/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nfsadmin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bastiaan Schaap
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|