resolver: Possibly redundant DHCP script for setting DHCP clients in DNS in init script
Since a while, DHCP clients are added to resolver via hotplug in /etc/hotplug.d/dhcp/40-dynamic-domains
. Since the update to TurrisOS 6.0, dnmasq is back to upstream behavior (in /usr/lib/dnsmasq/dhcp-script.sh
) which means
[ -f "$USER_DHCPSCRIPT" ] && . "$USER_DHCPSCRIPT" "$@"
But even if now there is hotplug, /etc/init.d/resolver
does
DHCP_SCRIPT=/etc/resolver/dhcp_host_domain_ng.py
[...]
set_dhcp_script() {
uci_set dhcp "@dnsmasq[0]" dhcpscript "$DHCP_SCRIPT"
uci_commit dhcp
}
So it sets the Python script, which is then attempted to be sourced, causing errors in the logs:
Oct 19 19:12:02 router dnsmasq-script[5182]: /usr/lib/dnsmasq/dhcp-script.sh: /etc/resolver/dhcp_host_domain_ng.py: line 3: import: not found
(from https://forum.turris.cz/t/turris-os-6-0-is-released/17830/74)
If this means of setting DHCP clients in DNS is redundant (and looks like it is), the resolver
init script should be adjusted accordingly.