summaryrefslogtreecommitdiffstats
path: root/lib/puppet/defaults.rb
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2009-04-02 18:56:53 -0500
committerLuke Kanies <luke@madstop.com>2009-04-02 18:56:53 -0500
commit6e79cc00965a50c44f215fd1e553281cfd2b87c9 (patch)
tree56c496df9ad6ab66dfb16993910eb5ff1c34d065 /lib/puppet/defaults.rb
parent62dad7a5f87f8d6285650ab1b727819db27cf2a7 (diff)
parentc62c19370bfba881819c1a3d9da2f8e6fb52e5d9 (diff)
downloadpuppet-6e79cc00965a50c44f215fd1e553281cfd2b87c9.tar.gz
puppet-6e79cc00965a50c44f215fd1e553281cfd2b87c9.tar.xz
puppet-6e79cc00965a50c44f215fd1e553281cfd2b87c9.zip
Merge branch '0.24.x'
Conflicts: bin/ralsh lib/puppet/executables/client/certhandler.rb lib/puppet/parser/functions/versioncmp.rb lib/puppet/parser/resource/reference.rb lib/puppet/provider/augeas/augeas.rb lib/puppet/provider/nameservice/directoryservice.rb lib/puppet/provider/ssh_authorized_key/parsed.rb lib/puppet/type.rb lib/puppet/type/file/checksum.rb spec/integration/defaults.rb spec/integration/transaction/report.rb spec/unit/executables/client/certhandler.rb spec/unit/indirector/ssl_rsa/file.rb spec/unit/node/catalog.rb spec/unit/provider/augeas/augeas.rb spec/unit/rails.rb spec/unit/type/ssh_authorized_key.rb spec/unit/type/tidy.rb test/executables/filebucket.rb test/executables/puppetbin.rb
Diffstat (limited to 'lib/puppet/defaults.rb')
-rw-r--r--lib/puppet/defaults.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/puppet/defaults.rb b/lib/puppet/defaults.rb
index 06469431d..fcd4346fb 100644
--- a/lib/puppet/defaults.rb
+++ b/lib/puppet/defaults.rb
@@ -89,8 +89,17 @@ module Puppet
: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",