diff options
author | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-03-06 21:19:34 +0000 |
---|---|---|
committer | luke <luke@980ebf18-57e1-0310-9a29-db15c13687c0> | 2006-03-06 21:19:34 +0000 |
commit | 54fcdbdbf7781153429fe55de6576b6bcf06a9a1 (patch) | |
tree | d255776fe401baec78b34d1de632eb1c574bc6ab /lib/puppet | |
parent | 0549d0393be2822359aa2392fabae1d7b23bca25 (diff) | |
download | puppet-54fcdbdbf7781153429fe55de6576b6bcf06a9a1.tar.gz puppet-54fcdbdbf7781153429fe55de6576b6bcf06a9a1.tar.xz puppet-54fcdbdbf7781153429fe55de6576b6bcf06a9a1.zip |
fixing some more logging issues
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@989 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'lib/puppet')
-rw-r--r-- | lib/puppet/parser/ast/objectdef.rb | 6 | ||||
-rwxr-xr-x | lib/puppet/server/fileserver.rb | 8 | ||||
-rwxr-xr-x | lib/puppet/type/pfile/source.rb | 3 | ||||
-rw-r--r-- | lib/puppet/type/service.rb | 4 |
4 files changed, 14 insertions, 7 deletions
diff --git a/lib/puppet/parser/ast/objectdef.rb b/lib/puppet/parser/ast/objectdef.rb index 59758b982..7b7bf6648 100644 --- a/lib/puppet/parser/ast/objectdef.rb +++ b/lib/puppet/parser/ast/objectdef.rb @@ -192,7 +192,7 @@ class Puppet::Parser::AST unless type.validattr?(pname) error = Puppet::ParseError.new( "Invalid parameter '%s' for type '%s'" % - [pname,type.name] + [pname,type.type] ) error.line = self.line error.file = self.file @@ -213,12 +213,10 @@ class Puppet::Parser::AST raise Puppet::DevError, detail.to_s end - # FIXME This should look through the scope tree, not in a global - # hash unless objtype.validarg?(pname) error = Puppet::ParseError.new( "Invalid parameter '%s' for type '%s'" % - [pname,objtype] + [pname,objtype.type] ) error.line = self.line error.file = self.file diff --git a/lib/puppet/server/fileserver.rb b/lib/puppet/server/fileserver.rb index 24bd50ec3..c0d1303fa 100755 --- a/lib/puppet/server/fileserver.rb +++ b/lib/puppet/server/fileserver.rb @@ -503,7 +503,13 @@ class Server def fileobj(path, links) obj = nil - unless obj = Puppet.type(:file)[path] + if obj = Puppet.type(:file)[path] + # This can only happen in local fileserving, but it's an + # important one. It'd be nice if we didn't just set + # the check params every time, but I'm not sure it's worth + # the effort. + obj[:check] = CHECKPARAMS + else obj = Puppet.type(:file).create( :name => path, :check => CHECKPARAMS diff --git a/lib/puppet/type/pfile/source.rb b/lib/puppet/type/pfile/source.rb index 391101e96..22d23b7b3 100755 --- a/lib/puppet/type/pfile/source.rb +++ b/lib/puppet/type/pfile/source.rb @@ -142,6 +142,7 @@ module Puppet raise Puppet::Error, "Cannot copy links yet" end else + self.info @stats.inspect self.err "Cannot use files of type %s as sources" % @stats[:type] @should = [:nocopy] @@ -162,6 +163,8 @@ module Puppet else @parent[stat] = value end + #else + # @parent.info "Already specified %s" % stat end } end diff --git a/lib/puppet/type/service.rb b/lib/puppet/type/service.rb index 4d7022961..da9f07d35 100644 --- a/lib/puppet/type/service.rb +++ b/lib/puppet/type/service.rb @@ -361,7 +361,7 @@ module Puppet # Execute a command. Basically just makes sure it exits with a 0 # code. def execute(type, cmd) - self.info "Executing %s" % cmd.inspect + self.debug "Executing %s" % cmd.inspect output = %x(#{cmd} 2>&1) unless $? == 0 self.fail "Could not %s %s: %s" % @@ -437,7 +437,7 @@ module Puppet self.respond_to?(:statuscmd) and self.statuscmd ) cmd = self[:status] || self.statuscmd - self.info "Executing %s" % cmd.inspect + self.debug "Executing %s" % cmd.inspect output = %x(#{cmd} 2>&1) self.debug "%s status returned %s" % [self.name, output.inspect] |