Class: Specinfra::Command::Base::Group
- Inherits:
-
Specinfra::Command::Base
- Object
- Specinfra::Command::Base
- Specinfra::Command::Base::Group
- Defined in:
- lib/specinfra/command/base/group.rb
Direct Known Subclasses
Class Method Summary collapse
Methods inherited from Specinfra::Command::Base
Class Method Details
.check_exists(group) ⇒ Object
3 4 5 |
# File 'lib/specinfra/command/base/group.rb', line 3 def check_exists(group) "getent group #{escape(group)}" end |
.check_has_gid(group, gid) ⇒ Object
7 8 9 10 |
# File 'lib/specinfra/command/base/group.rb', line 7 def check_has_gid(group, gid) regexp = "^#{group}" "getent group | grep -w -- #{escape(regexp)} | cut -f 3 -d ':' | grep -w -- #{escape(gid)}" end |