[Dnsmasq-discuss] Logging in DHCP script
Simon Kelley
simon at thekelleys.org.uk
Tue Mar 20 11:46:44 GMT 2012
On 20/03/12 09:50, Malte Forkel wrote:
>>>
>>> Can I detect in a DHCP script (specified by the dhcp-script option)
>>> whether extra DHCP logging (specifed by log-dhcp) is activated in
>>> dnsmasq? I would like to adapt the extent of my script's output to that
>>> of dnsmasq.
>>>
>> Not directly. You can look in /etc/dnsmasq.conf, but that won't catch
>> command-line arguments or other configuration files.
>>
>
> Thanks for your help. I have now wrapped my logging code into a test for
> log-dhcp:
>
> if grep -q -e '^log-dhcp' /etc/dnsmasq.conf; then
> logger -t "$LOGTAG" $*
> fi
>
> Could I possibly persuade you to add an environment variable
> DNSMASQ_LOG_DHCP that reflects log-dhcp?
>
Sure, I'll do it as part of the tftp script work that's ongoing.
Cheers,
Smion.
More information about the Dnsmasq-discuss
mailing list