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

Rowland Penny rpenny at samba.org
Thu Mar 29 15:41:48 UTC 2018


On Thu, 29 Mar 2018 16:24:32 +0100
Sebastian Arcus via samba <samba at lists.samba.org> wrote:

> On 29/03/18 15:52, Rowland Penny via samba wrote:
> > 
> > You could try adding something like this near to the top of
> > dhcp-dyndns.sh:
> > 
> > TTL=$(cat /etc/dhcp/dhcpd.conf | grep 'max-lease-time' | awk -F ';'
> > '{print $1}' | awk '{print $NF}')
> > 
> > Then replace the '3600' with '$TTL'
> 
> Thank you for that! I take it there is no corresponding variable,
> which can be used as an argument in dhcpd.conf when calling
> dhcp-dyndns.sh?

Not that I am aware of.

> 
> Also, I discovered another typo on the wiki page - which was actually
> a bit of a pain to track down. On the following line:
> 
> rzone=$(echo ${ip} | awk -F '.' '{print $3"."$2"."$1".in-addr.arpa"}’)

OOPs, I don't use that and I cut and pasted it in, which is no excuse
for not noticing, but it is fixed now ;-)


> I can report that on Slackware-current with dhcpd 4.4.1, the extra 
> setting suggested to set the rzone is necessary - otherwise Bind
> tries to use a B class reverse zone instead of a C one and complains
> that it isn't authoritative for it:
> 
> updating zone '168.192.IN-ADDR.ARPA/IN': update failed: not 
> authoritative for update zone (NOTAUTH)
> 
> I have other Slackware servers with dhcpd 4.3.6 and 4.3.4 - and those 
> are happy without the rzone line.
> 

Good to know.

Rowland




More information about the samba mailing list