summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/puppet/parser/ast/objectdef.rb6
-rwxr-xr-xlib/puppet/server/fileserver.rb8
-rwxr-xr-xlib/puppet/type/pfile/source.rb3
-rw-r--r--lib/puppet/type/service.rb4
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]