summaryrefslogtreecommitdiffstats
path: root/lib/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'lib/puppet')
-rw-r--r--lib/puppet/client/master.rb3
-rw-r--r--lib/puppet/client/reporter.rb3
-rw-r--r--lib/puppet/log.rb2
-rwxr-xr-xlib/puppet/parsedfile.rb8
-rwxr-xr-xlib/puppet/type/exec.rb4
-rw-r--r--lib/puppet/type/nameservice/netinfo.rb1
-rwxr-xr-xlib/puppet/type/package/gem.rb2
7 files changed, 13 insertions, 10 deletions
diff --git a/lib/puppet/client/master.rb b/lib/puppet/client/master.rb
index b130f4cbf..505a2109b 100644
--- a/lib/puppet/client/master.rb
+++ b/lib/puppet/client/master.rb
@@ -87,6 +87,7 @@ class Puppet::Client::MasterClient < Puppet::Client
end
transaction.addtimes :config_retrieval => @configtime
+
begin
transaction.evaluate
rescue Puppet::Error => detail
@@ -329,6 +330,8 @@ class Puppet::Client::MasterClient < Puppet::Client
def initialize(*args)
super
+ @configtime = Time.now
+
self.class.instance = self
@running = false
end
diff --git a/lib/puppet/client/reporter.rb b/lib/puppet/client/reporter.rb
index b0101e2fa..a92842e7c 100644
--- a/lib/puppet/client/reporter.rb
+++ b/lib/puppet/client/reporter.rb
@@ -1,9 +1,8 @@
-class Puppet::Client::Reporter < Puppet::Client::ProxyClient
+class Puppet::Client::Reporter < Puppet::Client
@drivername = :Report
# set up the appropriate interface methods
@handler = Puppet::Server::Report
- self.mkmethods
def initialize(hash = {})
if hash.include?(:Report)
diff --git a/lib/puppet/log.rb b/lib/puppet/log.rb
index 15a5b6331..f5dda5fcc 100644
--- a/lib/puppet/log.rb
+++ b/lib/puppet/log.rb
@@ -209,7 +209,7 @@ module Puppet
end
newdesttype :file do
- match /^\//
+ match(/^\//)
def close
if defined? @file
diff --git a/lib/puppet/parsedfile.rb b/lib/puppet/parsedfile.rb
index f256ca522..1b531b1a0 100755
--- a/lib/puppet/parsedfile.rb
+++ b/lib/puppet/parsedfile.rb
@@ -8,6 +8,10 @@ module Puppet
class ParsedFile
attr_reader :file
+ # Provide a hook for setting the timestamp during testing, so we don't
+ # have to depend on the granularity of the filesystem.
+ attr_writer :tstamp
+
Puppet.config.setdefaults(:puppet,
:filetimeout => [ 15,
"The minimum time to wait between checking for updates in
@@ -44,10 +48,6 @@ module Puppet
private
- # Provide a hook for setting the timestamp during testing, so we don't
- # have to depend on the granularity of the filesystem.
- attr_writer :tstamp
-
def stamp
@statted = Time.now
return File.stat(@file).ctime
diff --git a/lib/puppet/type/exec.rb b/lib/puppet/type/exec.rb
index 9b7275380..ffb4415a1 100755
--- a/lib/puppet/type/exec.rb
+++ b/lib/puppet/type/exec.rb
@@ -47,8 +47,8 @@ module Puppet
require 'open3'
require 'puppet/type/state'
- # Create a new check mechanism. It's basically just a parameter that provides
- # one extra 'check' method.
+ # Create a new check mechanism. It's basically just a parameter that
+ # provides one extra 'check' method.
def self.newcheck(name, &block)
@checks ||= {}
diff --git a/lib/puppet/type/nameservice/netinfo.rb b/lib/puppet/type/nameservice/netinfo.rb
index 786485b2c..6230aa31b 100644
--- a/lib/puppet/type/nameservice/netinfo.rb
+++ b/lib/puppet/type/nameservice/netinfo.rb
@@ -146,6 +146,7 @@ module Puppet
# This is really lame. We have to iterate over each
# of the groups and add us to them.
def setgrouplist(groups)
+ groups = groups.split(/\s*,\s*/)
# Get just the groups we need to modify
diff = groups - @is
diff --git a/lib/puppet/type/package/gem.rb b/lib/puppet/type/package/gem.rb
index f2509212e..31d6ad226 100755
--- a/lib/puppet/type/package/gem.rb
+++ b/lib/puppet/type/package/gem.rb
@@ -1,6 +1,6 @@
module Puppet
Puppet.type(:package).newpkgtype(:gem) do
- if gem = %x{which gem 2>/dev/null}.chomp and gem != ""
+ if gem = %x{which gem 2>/dev/null}.chomp and gem != "" and gem !~ /^no /
@@gem = gem
else
@@gem = nil