Hi there!

On Mon, 23 Apr 2012 15:48:52 +0200, Luca Capello wrote:
> Never mind, attached a patch against the Git repository.  Please note
> that I did not publicize the fact that the hook scripts can be used for
> whatever command you would like to execute ;-)
[...]
> +if ! [ -x /sbin/iptables ]; then
> +    echo "/sbin/iptables not found or not executable" 2>&1

The redirection is wrong, it should simply be ">&2", since only the
stderr will be logged:

  <http://www.libvirt.org/hooks.html#return_codes>

  Return codes and logging

  If a hook script returns with an exit code of 0, the libvirt daemon
  regards this as successful and performs no logging of it.

  However, if a hook script returns with a non zero exit code, the
  libvirt daemon regards this as a failure, logs it with return code
  256, and additionally logs anything on stderr the hook script returns.

Thx, bye,
Gismo / Luca

Attachment: pgpueQeR3Vbgr.pgp
Description: PGP signature

Reply via email to