specinfra 2.0.3 → 2.0.4
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c94f555e4758d65d6f972db97fc66e87bd5f428
|
4
|
+
data.tar.gz: 11bba5c1f94f44fbc4bb2175ed1e2b034dd072a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03911fa2d1415955f377a0c591d034078fa8aa64bd14ff07e890cb1b9583873e4676d398b62f884914efcb045d36d6d14452465f96b945291d4e92e1e6b7a3c8
|
7
|
+
data.tar.gz: 453b575dde92a1317e36ea84f156c2a554f04528f22191ffbea1980eb108fb936d16dc031529507f233f8a51aa6632e5f1b41caf49ec169cf1a68b2881677485
|
data/lib/specinfra/command.rb
CHANGED
@@ -27,6 +27,7 @@ require 'specinfra/command/base/ppa'
|
|
27
27
|
require 'specinfra/command/base/process'
|
28
28
|
require 'specinfra/command/base/routing_table'
|
29
29
|
require 'specinfra/command/base/selinux'
|
30
|
+
require 'specinfra/command/base/selinux_module'
|
30
31
|
require 'specinfra/command/base/service'
|
31
32
|
require 'specinfra/command/base/user'
|
32
33
|
require 'specinfra/command/base/yumrepo'
|
@@ -45,6 +46,7 @@ require 'specinfra/command/linux/base/lxc_container'
|
|
45
46
|
require 'specinfra/command/linux/base/package'
|
46
47
|
require 'specinfra/command/linux/base/ppa'
|
47
48
|
require 'specinfra/command/linux/base/selinux'
|
49
|
+
require 'specinfra/command/linux/base/selinux_module'
|
48
50
|
require 'specinfra/command/linux/base/service'
|
49
51
|
require 'specinfra/command/linux/base/yumrepo'
|
50
52
|
require 'specinfra/command/linux/base/zfs'
|
@@ -0,0 +1,16 @@
|
|
1
|
+
class Specinfra::Command::Linux::Base::SelinuxModule < Specinfra::Command::Base::SelinuxModule
|
2
|
+
class << self
|
3
|
+
def check_is_installed(name, version=nil)
|
4
|
+
cmd = "semodule -l | grep $'^#{escape(name)}\\t"
|
5
|
+
cmd += "#{escape(version)}\\t" unless version.nil?
|
6
|
+
cmd += "'"
|
7
|
+
cmd
|
8
|
+
end
|
9
|
+
|
10
|
+
def check_is_enabled(name)
|
11
|
+
cmd = "semodule -l | grep $'^#{escape(name)}\\t'"
|
12
|
+
cmd += " | grep -v $'^#{escape(name)}\\t.*\\tDisabled$'"
|
13
|
+
cmd
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
data/lib/specinfra/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: specinfra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gosuke Miyashita
|
@@ -170,6 +170,7 @@ files:
|
|
170
170
|
- lib/specinfra/command/base/process.rb
|
171
171
|
- lib/specinfra/command/base/routing_table.rb
|
172
172
|
- lib/specinfra/command/base/selinux.rb
|
173
|
+
- lib/specinfra/command/base/selinux_module.rb
|
173
174
|
- lib/specinfra/command/base/service.rb
|
174
175
|
- lib/specinfra/command/base/user.rb
|
175
176
|
- lib/specinfra/command/base/yumrepo.rb
|
@@ -214,6 +215,7 @@ files:
|
|
214
215
|
- lib/specinfra/command/linux/base/package.rb
|
215
216
|
- lib/specinfra/command/linux/base/ppa.rb
|
216
217
|
- lib/specinfra/command/linux/base/selinux.rb
|
218
|
+
- lib/specinfra/command/linux/base/selinux_module.rb
|
217
219
|
- lib/specinfra/command/linux/base/service.rb
|
218
220
|
- lib/specinfra/command/linux/base/yumrepo.rb
|
219
221
|
- lib/specinfra/command/linux/base/zfs.rb
|