Web lists-archives.com

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




On Thu, 29 Mar 2018 16:24:32 +0100
Sebastian Arcus via samba <samba@xxxxxxxxxxxxxxx> 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


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