[Dnsmasq-discuss] [PATCH] Logging of dhcp_script output
alex_y_xu at yahoo.ca
Fri Mar 24 18:19:04 GMT 2017
On Fri, 24 Mar 2017 13:38:17 -0400 (EDT)
Petr Mensik <pemensik at redhat.com> wrote:
> Some guys using dnsmasq in virtual machines and OpenStack use custom
> dhcp_script to manage leases of clients. However they complain if
> there is anything wrong with them, then are just told broken pipe and
> no information.
> We understand it should not produce any output under normal
> operation. But it would be really helpful if at least anything was
> visible in logs. Especially for errors happening under rare
> circumstances. I have prepared patch to forward events from helper.
> It prevents SIGPIPE receiving if script does write anything. And logs
> it from dnsmasq. It seems very handy to me.
> It was not simple to forward it to main log. I would like opinions if
> it is useful or dangerous. Do you consider it worth merging Simon?
> Best Regards,
> Petr Menšík
> Software Engineer
> Red Hat, http://www.redhat.com/
> email: pemensik at redhat.com PGP: 65C6C973
you could also just put "exec >/var/log/whatever 2>&1" at the start of
your script. hell, you can even do "exec > >(logger) 2>&1" if you want.
More information about the Dnsmasq-discuss