Class: Specinfra::Command::Linux::Base::Selinux
- Inherits:
-
Base::Selinux
- Object
- Base
- Base::Selinux
- Specinfra::Command::Linux::Base::Selinux
- Defined in:
- lib/specinfra/command/linux/base/selinux.rb
Class Method Summary collapse
Methods inherited from Base
Class Method Details
.check_has_mode(mode) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/specinfra/command/linux/base/selinux.rb', line 3 def check_has_mode(mode) cmd = "" cmd += "test ! -f /etc/selinux/config || (" if mode == "disabled" cmd += "getenforce | grep -i -- #{escape(mode)} " cmd += "&& grep -i -- ^SELINUX=#{escape(mode)}$ /etc/selinux/config" cmd += ")" if mode == "disabled" cmd end |