Sha256: 29ec99df52f1ee694a38d9be01c09c563ff49e469e9593f98bdb611a2d22ca44
Contents?: true
Size: 841 Bytes
Versions: 10
Compression:
Stored size: 841 Bytes
Contents
require 'puppet/provider/nameservice' class Puppet::Provider::NameService class ObjectAdd < Puppet::Provider::NameService def deletecmd [command(:delete), @resource[:name]] end # Determine the flag to pass to our command. def flag(name) name = name.intern if name.is_a? String self.class.option(name, :flag) || "-" + name.to_s[0,1] end def modifycmd(param, value) cmd = [command(:modify), flag(param), value] if @resource.allowdupe? && ((param == :uid) || (param == :gid and self.class.name == :groupadd)) cmd << "-o" end cmd << @resource[:name] return cmd end def posixmethod(name) name = name.intern if name.is_a? String method = self.class.option(name, :method) || name return method end end end
Version data entries
10 entries across 10 versions & 1 rubygems