A resource agent may need to test for the availability of a specific
executable. The have_binary convenience function comes in handy
here:
if ! have_binary frobnicate; then ocf_log warn "Missing frobnicate binary, frobnication disabled!" fi
If a missing binary is a fatal problem for the resource, then the
check_binary function should be used:
check_binary frobnicate
Using check_binary is a shorthand method for testing for the
existence (and executability) of the specified binary, and exiting
with $OCF_ERR_INSTALLED if it cannot be found or executed.
![]() | Note |
|---|---|
Both |