Hello,
Needing to check understanding: the default script for udhcpc in OpenWrt handles peer DNS servers by updating the UCI configuration for dnsmasq and then reloading it?
I'm trying to work with a "secondary router" that has limited responsibilities, for now this means that dnsmasq is not installed.
Its WAN port is always set to use the DHCP client.
To get equivalent functionality, I have to create a udhcpc user script in /etc/udhcpc.user.d/ to process the server list and append them to /tmp/resolv.conf, like this:-
case "${1}" in
(bound|renew) ;;
(*) exit 0 ;;
esac
RESOLV_CONF="/tmp/resolv.conf"
echo -n > $RESOLV_CONF
[ -n "$domain" ] && echo search $domain >> $RESOLV_CONF
for i in $dns ; do
echo nameserver $i >> $RESOLV_CONF
done
Is this correct, or is there another way of achieving the same thing?