summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-03-19 21:37:52 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-03-19 21:37:52 +0000
commitbcc937a2c65de110f3afc28b84ca8a971ab7e88f (patch)
tree129ccfd3bc1fccea7e472acbb0a303b3dd6f5979 /lib
parent60ea7d2a9df65f3c2ed492ec4447420c5e5151fe (diff)
downloadpuppet-bcc937a2c65de110f3afc28b84ca8a971ab7e88f.tar.gz
puppet-bcc937a2c65de110f3afc28b84ca8a971ab7e88f.tar.xz
puppet-bcc937a2c65de110f3afc28b84ca8a971ab7e88f.zip
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
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/network/client/master.rb2
-rw-r--r--lib/puppet/type.rb7
2 files changed, 8 insertions, 1 deletions
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)