hello,
long story made short. I have a openwrt router and an openwrt dumb AP. Trying to get hostnames also on the AP status page. So i created a inotify based init script on the router that copies dhcp.leases to the ap every time it is changed.
The copy is made with scp with key auth.
yes i had just tried (for pure debugging) and it's amazing, it's not resolving the name with the local name server, it's asking to the dns server of the internet connection
this doesn't make any sense
root@RUTTO:~# /etc/config/inotifyDHCP.sh
Setting up watches.
Watches established.
DHCP Leases event: /tmp/dhcp.leases CLOSE_WRITE,CLOSE. Updating AP
Server: 2001:4860:4860::8888
Address: [2001:4860:4860::8888]:53
** server can't find accesspoint.lan: NXDOMAIN
** server can't find accesspoint.lan: NXDOMAIN
/usr/bin/dbclient: Connection to root@accesspoint.lan:22 exited: Connect failed: Error resolving 'accesspoint.lan' port '22'. Name does not resolve
lost connection
i tried also with different script style (not using pipes, just while - do) and when i use inotifywait it breaks
this is a total nonsense an honestly i have no idea how to debug further.
ideas?
i also tried updatint to 24.10-rc4 but the issue i the same..
The DHCP server changes dhcp.leases, and triggers the DNS server to cope with that. I can imagine the DNS server will be down for a short moment because of that. Your inotifywait helps to sync on that short moment.
If the issue is in fact a blip in DNS, perhaps modify your script to lookup the address of accesspoint.lan in advance and assign to a variable. Something like
i'm not in doubt about the ip of the AP (that is fixed), it's a matter of ssh key connected to the hostname and not the ip, so resolving it before che SCP and using the ip is the same that using the fixed ip by itself..
i was curious about the "blip", as you called it, but it seems inside a pipe.. sleep does not sleep lol
am i missing something very stupid (again)?