ExecResult puts not only the stdout of the exec'd command into the variable, but the stderr as well. This makes it almost impossible to trap for errors, because I do not know what could be in there. (I now have a ufsdump file named "device not found.dump" as a result of this. <grin>)

I think it would be much more reasonable to only trap stdout; that way I could look for null variables.
Another option would be to create a command with syntax like:

CheckExecResult("command",err_class)

If "command" returns nonzero, then err_class would be set.




--

Chip Seraphine
Unix Administrator
TradeLink, LLC
312-264-2048
[EMAIL PROTECTED]




_______________________________________________
Help-cfengine mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-cfengine

Reply via email to