Search $PATH for executables when no absolute path is given
Search $PATH for executables when no absolute path is given

If the config file / built-in default has an absolute path e.g.

  pygrub=/usr/bin/pygrub

then the behaviour is unchanged: if the file is not present
an error will be logged and startup fails.

If the config file / built-in default has a relative path e.g.

  pygrub=pygrub

then the behaviour is different. Previously we would have
looked only in the current working directory of the daemon
(typically /). Instead we search the directories of $PATH and
use the first hit. If no file can be found then we log a warning
and continue with the relative path, which will almost-certainly
cause a further error to be logged and startup to fail.

This avoids having to write distro-specific config files to
cope with minor filesystem differences (e.g. /usr/sbin/brctl
on Fedora might be /sbin/brctl on Ubuntu)

Signed-off-by: David Scott <63c9eb0ea83039690fefa11afe17873ba8278a56@eu.citrix.com>

xapi-project/message-switch,xapi-project/message-switch,djs55/xcp-idl,johnelse/xcp-idl,euanh/xcp-idl,xapi-project/message-switch,Chunjie/xcp-idl