[Samba] Fwd: DHCP Updates to DNS - Multiple Entries with Same IP
Robi. T. Wagner
test_drive_123 at outlook.com
Wed Jun 17 10:49:42 UTC 2020
Dear Rowland
I still have the problem that both dhcp's are running the dhcp-dyndns.sh script and therefore I changed the shell script, to skip deleting and adding every record and to do only necessary changing.
While changing, I found a Typo in sub: rev_zone_info () {
case "$numwords" in
1) # single ip rev zone '192'
ZoneIP=$(echo "${IP}" | awk -F '.' '{print $1}')
RZIP=$(echo "${rzoneip}" | awk -F '.' '{print $3}')
It should be $1 instead of $3
BTW.: I changed it also to array manipulation instead of sed statements.
A second problem I had with my laptops with WLAN and LAN, where I use ddns-hostname to distinguish between both interfaces, which is not honored in your "on commit" statement
Adding the config-option as first choice overcomes this problem as follows:
pick-first-value(config-option server.ddns-hostname, option host-name,......
the third problem I had was that you check with "host" if the record exists in DNS, but in my case it refers to "example.com" and not to "samdom.example.com", which gives a lot of strange errors.
If you are interested in my rewrite, send me an email
Mani
More information about the samba
mailing list