diff options
author | Steve Wills <swills@FreeBSD.org> | 2011-11-13 13:18:28 +0000 |
---|---|---|
committer | Steve Wills <swills@FreeBSD.org> | 2011-11-13 13:18:28 +0000 |
commit | 537e69f52fbb17af5c7d0b4235ce8c833c706907 (patch) | |
tree | f772c46be6de565b99dca09fc73e65cddf7bcac4 /sysutils/puppet | |
parent | e310593f4ab1ecf07bd82258cc55352816bfb327 (diff) | |
download | ports-537e69f52fbb17af5c7d0b4235ce8c833c706907.tar.gz ports-537e69f52fbb17af5c7d0b4235ce8c833c706907.zip |
Notes
Diffstat (limited to 'sysutils/puppet')
-rw-r--r-- | sysutils/puppet/Makefile | 1 | ||||
-rw-r--r-- | sysutils/puppet/files/patch-fix_password_provider | 21 |
2 files changed, 18 insertions, 4 deletions
diff --git a/sysutils/puppet/Makefile b/sysutils/puppet/Makefile index 545dd9075024..4f213907569b 100644 --- a/sysutils/puppet/Makefile +++ b/sysutils/puppet/Makefile @@ -7,6 +7,7 @@ PORTNAME= puppet PORTVERSION= 2.7.6 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= http://downloads.puppetlabs.com/puppet/ diff --git a/sysutils/puppet/files/patch-fix_password_provider b/sysutils/puppet/files/patch-fix_password_provider index 8fd0e20fac78..8758296d017b 100644 --- a/sysutils/puppet/files/patch-fix_password_provider +++ b/sysutils/puppet/files/patch-fix_password_provider @@ -1,5 +1,3 @@ -diff --git lib/puppet/provider/user/pw.rb lib/puppet/provider/user/pw.rb -index a5988ca..c2fff37 100644 --- lib/puppet/provider/user/pw.rb +++ lib/puppet/provider/user/pw.rb @@ -1,10 +1,11 @@ @@ -15,11 +13,27 @@ index a5988ca..c2fff37 100644 defaultfor :operatingsystem => :freebsd -@@ -37,5 +38,24 @@ Puppet::Type.type(:user).provide :pw, :parent => Puppet::Provider::NameService:: +@@ -23,7 +24,7 @@ Puppet::Type.type(:user).provide :pw, :parent => Puppet::Provider::NameService:: + def addcmd + cmd = [command(:pw), "useradd", @resource[:name]] + @resource.class.validproperties.each do |property| +- next if property == :ensure ++ next if property == :ensure or property == :password + # the value needs to be quoted, mostly because -c might + # have spaces in it + if value = @resource.should(property) and value != "" +@@ -37,5 +38,30 @@ Puppet::Type.type(:user).provide :pw, :parent => Puppet::Provider::NameService:: cmd end + ++ def create ++ super ++ ++ # Set the password after create if given ++ self.password = @resource[:password] if @resource[:password] ++ end ++ + # use pw to update password hash + def password=(cryptopw) + Puppet.debug "change password for user '#{@resource[:name]}' method called with hash '#{cryptopw}'" @@ -37,6 +51,5 @@ index a5988ca..c2fff37 100644 + Puppet.debug "finished password for user '#{@resource[:name]}' method called : '#{current_password}'" + current_password + end -+ end |