Class: Specinfra::Command::Solaris::Base::Group

Inherits:
Base::Group show all
Defined in:
lib/specinfra/command/solaris/base/group.rb

Direct Known Subclasses

V10::Group

Class Method Summary collapse

Methods inherited from Base::Group

add, check_exists, get_gid, update_gid

Methods inherited from Base

create, escape

Class Method Details

.check_has_gid(group, gid) ⇒ Object



3
4
5
6
# File 'lib/specinfra/command/solaris/base/group.rb', line 3

def check_has_gid(group, gid)
  regexp = "^#{group}:"
  "getent group | grep -- #{escape(regexp)} | cut -f 3 -d ':' | grep -w -- #{escape(gid)}"
end