lib/puppet/defaults.rb in puppet-0.24.7 vs lib/puppet/defaults.rb in puppet-0.24.8
- old
+ new
@@ -93,11 +93,20 @@
"Whether to create the necessary user and group that puppetd will
run as."],
:path => {:default => "none",
:desc => "The shell search path. Defaults to whatever is inherited
from the parent process.",
+ :call_on_define => true, # Call our hook with the default value, so we always get the libdir set.
:hook => proc do |value|
ENV["PATH"] = value unless value == "none"
+
+ paths = ENV["PATH"].split(File::PATH_SEPARATOR)
+ %w{/usr/sbin /sbin}.each do |path|
+ unless paths.include?(path)
+ ENV["PATH"] += File::PATH_SEPARATOR + path
+ end
+ end
+ value
end
},
:libdir => {:default => "$vardir/lib",
:desc => "An extra search path for Puppet. This is only useful
for those files that Puppet will load on demand, and is only