diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2005-08-30 04:26:27 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2005-08-30 04:26:27 +0000 |
commit | e1de0028f73cb5eb5a8ccbc45d96940d1c7c470f (patch) | |
tree | 3985301693c5751b34f8b4b2a2866dfcbff27cc5 | |
parent | 5c0fb024d1bf891b79ae120adc7435da8d0ec2c3 (diff) | |
download | puppet-e1de0028f73cb5eb5a8ccbc45d96940d1c7c470f.tar.gz puppet-e1de0028f73cb5eb5a8ccbc45d96940d1c7c470f.tar.xz puppet-e1de0028f73cb5eb5a8ccbc45d96940d1c7c470f.zip |
Fixed small bug that caused the config files to be parsed on every connection
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@615 980ebf18-57e1-0310-9a29-db15c13687c0
-rwxr-xr-x | lib/puppet/server/fileserver.rb | 7 | ||||
-rw-r--r-- | lib/puppet/server/master.rb | 7 | ||||
-rw-r--r-- | lib/puppet/type/pfile.rb | 4 |
3 files changed, 13 insertions, 5 deletions
diff --git a/lib/puppet/server/fileserver.rb b/lib/puppet/server/fileserver.rb index d25185476..4deeea46c 100755 --- a/lib/puppet/server/fileserver.rb +++ b/lib/puppet/server/fileserver.rb @@ -182,14 +182,17 @@ class Server return if @noreadconfig if @configstamp and FileTest.exists?(@config) - if @configtimeout and @configstatted and - (Time.now - @configstatted > @configtimeout) + if @configtimeout and @configstatted + if Time.now - @configstatted > @configtimeout @configstatted = Time.now tmp = File.stat(@config).ctime if tmp == @configstamp return end + else + return + end end end diff --git a/lib/puppet/server/master.rb b/lib/puppet/server/master.rb index dd16c788d..5f3700978 100644 --- a/lib/puppet/server/master.rb +++ b/lib/puppet/server/master.rb @@ -91,8 +91,8 @@ class Server def parsefile if @filestamp and FileTest.exists?(@file) - if @filetimeout and @filestatted and - (Time.now - @filestatted > @filetimeout) + if @filetimeout and @filestatted + if Time.now - @filestatted > @filetimeout tmp = File.stat(@file).ctime @filestatted = Time.now @@ -101,6 +101,9 @@ class Server else Puppet.notice "Reloading file" end + else + return + end end end diff --git a/lib/puppet/type/pfile.rb b/lib/puppet/type/pfile.rb index 9b8d05571..e46d6fdb6 100644 --- a/lib/puppet/type/pfile.rb +++ b/lib/puppet/type/pfile.rb @@ -635,7 +635,9 @@ module Puppet class PFileSource < Puppet::State attr_accessor :source, :local @doc = "Copy a file over the current file. Uses `checksum` to - determine when a file should be copied." + determine when a file should be copied. Valid values are either + fully qualified paths to files, or URIs. Currently supported URI + types are *puppet* and *file*." @name = :source def describe |