Ticket #432: puppet-user.2.patch
| File puppet-user.2.patch, 2.3 kB (added by tim, 2 years ago) |
|---|
-
puppet-0.22.0/lib/puppet/provider/nameservice/objectadd.rb
old new 12 12 end 13 13 14 14 def deletecmd 15 [command(:delete), @model[:name]] 15 if @model[:managehome] == :true 16 [command(:delete), "-r", @model[:name]] 17 else 18 [command(:delete), @model[:name]] 19 end 16 20 end 17 21 18 22 # Determine the flag to pass to our command. -
puppet-0.22.0/lib/puppet/provider/user/useradd.rb
old new 24 24 # the value needs to be quoted, mostly because -c might 25 25 # have spaces in it 26 26 if value = @model.should(state) and value != "" 27 cmd << flag(state) << value 27 if state == :comment 28 cmd << flag(state) << ("'" + value + "'") 29 else 30 cmd << flag(state) << value 31 end 28 32 end 29 33 end 30 34 # stupid fedora … … 36 40 if @model[:allowdupe] == :true 37 41 cmd << "-o" 38 42 end 43 if @model[:managehome] == :true 44 cmd << "-m" 45 end 39 46 40 47 cmd << @model[:name] 41 48 -
puppet-0.22.0/lib/puppet/type/user.rb
old new 321 321 defaultto false 322 322 end 323 323 324 newparam(:managehome) do 325 desc "Whether to create/remove home dir." 326 327 newvalues(:true, :false) 328 329 defaultto false 330 end 331 324 332 @doc = "Manage users. Currently can create and modify users, but 325 333 cannot delete them. Theoretically all of the parameters are 326 334 optional, but if no parameters are specified the comment will