The idea is to run the exec if the unless command fails.

As in most programming languages where it's a keyword, "unless" mean
"if not".  Process return codes are the opposite of boolean: 0 is
success and nonzero is failure.

So all of these pseudocodes are equivalent:

unless => "some_command"
unless => [some_command returns 0]
onlyif => not [some_command returns 0]
onlyif => some_command returns nonzero.
onlyif => some_command fails

Dustin

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-dev/CAJtE5vREWcCi48R%2BwLLXhTDG0wbd5ESD9NWjMXnEVWyVDpDELA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to