Method: Puppet::Provider::NameService.section

Defined in:
lib/puppet/provider/nameservice.rb

.sectionObject

This is annoying, but there really aren’t that many options, and this is built into Ruby.



72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/puppet/provider/nameservice.rb', line 72

def section
  unless resource_type
    raise Puppet::DevError,
          "Cannot determine Etc section without a resource type"
  end

  if @resource_type.name == :group
    "gr"
  else
    "pw"
  end
end