-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hanno Schupp schrieb:
> Fantastic. Thank you very much for your comments. This makes things a
> lot clearer.
> 
> I conclude from what you wrote that: - Adding DNS server ip addresses
> to /tmp/resolv.conf by adding them to the DNS_SERVER variable at the
> top of the /etc/init.d/dnsmasq script is useless - they will never be
> read or used.

They will only be used by the local system but are not usable by clients
through the cache.

> - If DNS servers are added as dns option to the /etc/config/network,
> they are added to the /tmp/resolv.conf.auto before the DNS servers
> discovered byt /etc/init.d/network script.

Yes.

> - Therefore, if I write a script that runs after /etc/init.d/network,
> adds a few DNS servers at the end of /tmp/resolv.conf.auto before 
> /etc/init.d/dnsmasq is started, then my scenario could be
> accommodated.

Kind-of. Interface setup happen asynchronously, the network init just
kicks off the background tasks. So even if the init script is finished,
an associated daeomon (pppd, udhcpc) might still be negotiation the
connection. DNS servers are added to resolv as one of the very last steps.

If you know which interface is going to be the "wan" you should hook
into hotplug in /etc/hotplug.d/iface/. Make your script handling the
INTERFACE=wan ACTION=ifup event and write the NS servers there, then
you'll not running into timing issues.

~ Jow
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyPVVsACgkQdputYINPTPMjNACdEGOGQA5wRlUmpWxy//6w8KCj
jxsAnRAI+fyaVkpYfvqXvKJ4mQxZi1tX
=Mf7R
-----END PGP SIGNATURE-----
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to