Import of pkgsrc-2015Q3
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
$NetBSD: patch-ae,v 1.3 2014/01/01 23:46:38 tonnerre Exp $
|
||||
$NetBSD: patch-ae,v 1.4 2015/08/17 13:20:43 fhajny Exp $
|
||||
|
||||
Fix detection of useradd user management under NetBSD.
|
||||
|
||||
NetBSD doesn't have chage but can use the -e and -f flags to passwd to
|
||||
achieve the same.
|
||||
|
||||
--- lib/puppet/provider/user/useradd.rb.orig 2014-01-01 23:22:45.000000000 +0000
|
||||
--- lib/puppet/provider/user/useradd.rb.orig 2015-08-14 08:28:22.481468919 +0000
|
||||
+++ lib/puppet/provider/user/useradd.rb
|
||||
@@ -5,13 +5,16 @@ Puppet::Type.type(:user).provide :userad
|
||||
@@ -9,13 +9,16 @@ Puppet::Type.type(:user).provide :userad
|
||||
install Ruby's shadow password library (often known as `ruby-libshadow`)
|
||||
if you wish to manage user passwords."
|
||||
|
||||
@@ -18,12 +18,12 @@ achieve the same.
|
||||
options :home, :flag => "-d", :method => :dir
|
||||
options :comment, :method => :gecos
|
||||
options :groups, :flag => "-G"
|
||||
- options :password_min_age, :flag => "-m"
|
||||
- options :password_max_age, :flag => "-M"
|
||||
+ options :password_min_age, :flag => "-m" unless %w{NetBSD}.include? Facter.value(:operatingsystem)
|
||||
+ options :password_max_age, :flag => "-M" unless %w{NetBSD}.include? Facter.value(:operatingsystem)
|
||||
- options :password_min_age, :flag => "-m", :method => :sp_min
|
||||
- options :password_max_age, :flag => "-M", :method => :sp_max
|
||||
+ options :password_min_age, :flag => "-m", :method => :sp_min unless %w{NetBSD}.include? Facter.value(:operatingsystem)
|
||||
+ options :password_max_age, :flag => "-M", :method => :sp_max unless %w{NetBSD}.include? Facter.value(:operatingsystem)
|
||||
+ options :password_min_age, :flag => "-e" if %w{NetBSD}.include? Facter.value(:operatingsystem)
|
||||
+ options :password_max_age, :flag => "-f" if %w{NetBSD}.include? Facter.value(:operatingsystem)
|
||||
|
||||
verify :gid, "GID must be an integer" do |value|
|
||||
value.is_a? Integer
|
||||
options :password, :method => :sp_pwdp
|
||||
options :expiry, :method => :sp_expire,
|
||||
:munge => proc { |value|
|
||||
|
||||
Reference in New Issue
Block a user