[Dnsmasq-discuss] dhcp-script not being called with "del"
Simon Kelley
simon at thekelleys.org.uk
Wed Feb 26 16:48:44 GMT 2020
On 23/02/2020 19:41, William Edwards wrote:
> Hi,
>
> I have a 'dhcp-script'. It is being called with "add" and "old" upon
> requesting DHCP lease, but when a lease expires, it is not called with
> "del".
>
> To test, I changed lease time to 1 minute and kept an eye on
> /var/lib/misc/dnsmasq.leases . After 1 minute, the lease disappeared
> from /var/lib/misc/dnsmasq.leases (thus expired). However, the
> 'dhcp-script' was not called.
>
> How could I start researching this issue?
>
For a start, be aware the dnsmasq enforces a minimum time of two minutes
on DHCP leases, so what you think is happening may not actually be
happening.
Making your script something like
#!/bin/bash
echo $* >>/tmp/logfile
env >>/tmp/logfile
is useful to see what's going on.
Simon.
More information about the Dnsmasq-discuss
mailing list