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

Sebastian Arcus s.arcus at open-t.co.uk
Thu Mar 29 17:22:52 UTC 2018


On 29/03/18 16:41, Rowland Penny via samba wrote:
> 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 ;-)

Thank you very much!



More information about the samba mailing list