From bcc937a2c65de110f3afc28b84ca8a971ab7e88f Mon Sep 17 00:00:00 2001 From: luke Date: Mon, 19 Mar 2007 21:37:52 +0000 Subject: Absolutely guaranteeing that the provider is always created before anything else. Previously, it could get created later if it were using a default. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2329 980ebf18-57e1-0310-9a29-db15c13687c0 --- lib/puppet/network/client/master.rb | 2 +- lib/puppet/type.rb | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/puppet/network/client/master.rb b/lib/puppet/network/client/master.rb index 7feebd2e6..52a569b36 100644 --- a/lib/puppet/network/client/master.rb +++ b/lib/puppet/network/client/master.rb @@ -140,7 +140,7 @@ class Puppet::Network::Client::Master < Puppet::Network::Client return false end if facts_changed?(facts) - Puppet.info "Facts have changed; recompiling" + Puppet.info "Facts have changed; recompiling" unless local? return false end diff --git a/lib/puppet/type.rb b/lib/puppet/type.rb index 0144b517c..b745c6322 100644 --- a/lib/puppet/type.rb +++ b/lib/puppet/type.rb @@ -261,6 +261,13 @@ class Type < Puppet::Element end end + if hash.include?(:provider) + self[:provider] = hash[:provider] + hash.delete(:provider) + else + setdefaults(:provider) + end + # This is all of our attributes except the namevar. attrs.each { |attr| if hash.include?(attr) -- cgit