Hi,

A little annoyance about "exec" that bothers me is that there is no way to 
use "unless"/"onlyif" except with external commands, even if a simple Ruby 
function could be used to execute the test.

e.g. "onlyif => 'test -d /data'" will fork and exec "test" to do a simple 
stat(2) which can be done with much less overhead with Ruby's 
"File.directory?('/data')".

How about allowing passing a none-string value to Exec's onlyif/unless 
attributes, and consider that as the result? If it's a string then it will 
be treated as today, otherwise it will be treated as a boolean.

I don't think this will break any backward compatibility since all Exec's 
currently expect strings to execute.

Cheers,

--Amos

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to