summaryrefslogtreecommitdiffstats
path: root/lib/puppet/network/client
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-03-19 17:43:58 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2007-03-19 17:43:58 +0000
commit531136ef9ef7bfa1626fb967708e7289be7fb23e (patch)
treed117a6839de937c1a291aeec4d909666dae1f1be /lib/puppet/network/client
parent0153a0618396847dc1ecb05be4745adad9c34a45 (diff)
Updating the config generation stuff a bit, mostly just cleanup, but also changing the servername fact to be the fqdn of the server.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2321 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet/network/client')
-rw-r--r--lib/puppet/network/client/master.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/puppet/network/client/master.rb b/lib/puppet/network/client/master.rb
index d568b8ae7..a75410256 100644
--- a/lib/puppet/network/client/master.rb
+++ b/lib/puppet/network/client/master.rb
@@ -174,8 +174,10 @@ class Puppet::Network::Client::Master < Puppet::Network::Client
if self.objects or FileTest.exists?(self.cachefile)
if self.fresh?(facts)
Puppet.info "Config is up to date"
- unless self.objects
- oldtext = self.retrievecache
+ if self.objects
+ return
+ end
+ if oldtext = self.retrievecache
begin
@objects = YAML.load(oldtext).to_type
rescue => detail
@@ -278,7 +280,7 @@ class Puppet::Network::Client::Master < Puppet::Network::Client
if FileTest.exists?(self.cachefile)
return ::File.read(self.cachefile)
else
- return ""
+ return nil
end
end
@@ -597,8 +599,7 @@ class Puppet::Network::Client::Master < Puppet::Network::Client
fromcache = false
if textobjects == ""
- textobjects = self.retrievecache
- if textobjects == ""
+ unless textobjects = self.retrievecache
raise Puppet::Error.new(
"Cannot connect to server and there is no cached configuration"
)