Server IP : 111.118.215.189 / Your IP : 18.216.116.62 Web Server : Apache System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : a1673wkz ( 2475) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /usr/share/ruby/vendor_ruby/puppet/provider/nameservice/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
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(param.to_s =~ /password_.+_age/ ? :password : :modify)] cmd << flag(param) << value if @resource.allowdupe? && ((param == :uid) || (param == :gid and self.class.name == :groupadd)) cmd << "-o" end cmd << @resource[:name] cmd end def posixmethod(name) name = name.intern if name.is_a? String method = self.class.option(name, :method) || name method end end end