Web lists-archives.com

[Samba] dhcp lease time hardware in script at dhcpd/Bind/Samba wiki page

There seems to be a slight issue with the instructions at the following wiki page:


The /usr/local/bin/dhcp-dyndns.sh script seems to use a hardwired value for the lease expiry time of 3600 - independent of whatever is configured in dhcpd.conf. With the examples provided, it should work, as the example dhcpd.conf uses 1800 for lease expiry time - so dhcpd will try to renew the lease before it actually expires. However, when I implemented the script, I didn't notice that the lease time is hardwired in the dhcp-dyndns.sh script - so I've set a higher value in dhcpd.conf. This seems to have caused all sorts of strange behaviour, as Bind/samba_dlz were expiring leases and dhcpd wasn't renewing them - thinking they are still valid.

Would it be possible to pass the max lease time value from dhcpd.conf to the dhcp-dyndns.sh script somehow? I would have made a suggestion myself, but for the life of me I can't find anywhere on the net a reference of standard variable which can be used in dhcpd.conf.

If the above is not possible, maybe a max-lease-time variable should be placed at the top of the dhcp-dyndns.sh script. so that at least it is obvious that this is set again in this script, and not carried over from dhcpd.conf?

To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba