On Tue, 2009-04-28 at 19:43 +0200, Jo-Philipp Wich wrote: > > Hmm ... I'm no expert with this but shouldn't /etc/nsswitch.conf take > care of the order of used resolvers? Could you try if this works for the > affected tools: > > echo "$(uci get network.wan.ipaddr) $(cat /proc/sys/kernel/hostname)" \ > >> /tmp/hosts.local > > uci set dhcp.dnsmasq.addnhosts=/tmp/hosts.local > uci commit dhcp > /etc/init.d/dnsmasq restart
Doesn't this presume the use of dnsmasq on the router? What if one isn't using dnsmasq? I surely don't. I think this use-case illustrates why the right solution is probably to generate the hosts file in /tmp and point to it with a symlink in /etc/. Perhaps there should be an /etc/hosts.base that is used in the generation for one that wants to have static entries in a /etc/hosts file. > > An alternative is for /etc/hosts to be generated in /tmp and symlinked > > to /etc ... Indeed. > We done that for LuCI but it seems to confuse/annoy users... Hrm. If one understands the working environment of an embedded device like a router, why is one confused? IOW, if one is confused by this, then one should likely not be mucking around in configuration files and one should likely stick to configuration interfaces provided for the less initiated. b.
signature.asc
Description: This is a digitally signed message part
_______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel