Signed-off-by: Martin Englund <[email protected]>
---
lib/puppet/type/exec.rb | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/lib/puppet/type/exec.rb b/lib/puppet/type/exec.rb
index a68bfb1..15ff69f 100755
--- a/lib/puppet/type/exec.rb
+++ b/lib/puppet/type/exec.rb
@@ -272,6 +272,10 @@ module Puppet
defaultto 300
end
+ newparam(:project) do
+ desc "Executes the command using the supplied task on Solaris."
+ end
+
newcheck(:refreshonly) do
desc "The command should only be run as a
refresh mechanism for when a dependent object is changed. It
only
@@ -425,6 +429,10 @@ module Puppet
validate do
validatecmd(self[:command])
+
+ if self[:project] && Facter.value(:operatingsystem) != "Solaris"
+ self.fail "project is only valid on Solaris"
+ end
end
# FIXME exec should autorequire any exec that 'creates' our cwd
@@ -562,6 +570,9 @@ module Puppet
if check
debug "Executing check '#{command}'"
else
+ if self[:project]
+ command = "/usr/bin/newtask -p #{self[:project]} " +
command
+ end
debug "Executing '#{command}'"
end
begin
--
1.6.4.4
--
You received this message because you are subscribed to the Google Groups
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-dev?hl=en.