On Sun, May 27, 2012 at 1:18 PM, hohum <[email protected]> wrote:
> I get an error that the exec command failed because it returned 1 instead of
> 0 but when I copy the command puppet outputs as an error, and paste that
> into a shell it works perfectly.  The command's syntax is this:

Hi,

After you run your command in your shell, try running the following
command: echo $?

This will echo back the return code of the previous command, which I
suspect will be 1. Just because a command doesn't return any output
doesn't mean it exited 0.

If it turns out that the exit code of 1 (or whatever) is what you'd
like to consider success, you can tell Puppet what return code should
indicate success with the returns parameter:
http://docs.puppetlabs.com/references/stable/type.html#exec

HTH!

--Ryan

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" 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-users?hl=en.

Reply via email to