Re: [OpenWrt-Devel] Management of /etc/hosts localhost ip address entry

2009-05-11 Thread Brian J. Murrell
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)

Re: [OpenWrt-Devel] Management of /etc/hosts localhost ip address entry

2009-04-28 Thread Jo-Philipp Wich
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi. > I'm not 100% sure that the tools accessing /etc/hosts were doing so > through DNS. Do any uclibc functions access /etc/hosts directly? Hmm ... I'm no expert with this but shouldn't /etc/nsswitch.conf take care of the order of used resolvers? C

Re: [OpenWrt-Devel] Management of /etc/hosts localhost ip address entry

2009-04-27 Thread Rod Whitby
Jo-Philipp Wich wrote: > Hmm, on vanilla OpenWrt the /etc/hosts is stored on flash, that would > mean a write on each dhcp renew. I fully agree that would be bad and must be avoided. > Wouldn't it be better to write the > hostname to an extra file somewhere in /tmp and pass that to dnsmasq > with

Re: [OpenWrt-Devel] Management of /etc/hosts localhost ip address entry

2009-04-27 Thread Jo-Philipp Wich
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hmm, on vanilla OpenWrt the /etc/hosts is stored on flash, that would mean a write on each dhcp renew. Wouldn't it be better to write the hostname to an extra file somewhere in /tmp and pass that to dnsmasq with addnhosts ? ~ JoW -BEGIN PGP SIGNAT

Re: [OpenWrt-Devel] Management of /etc/hosts localhost ip address entry

2009-04-27 Thread Jo-Philipp Wich
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Rod. The udhcpc script is currently rewritten, we'll include this change. ~ JoW -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkn2MQUACgkQdputYINPTPM0OQC

[OpenWrt-Devel] Management of /etc/hosts localhost ip address entry

2009-04-26 Thread Rod Whitby
I'm looking for feedback on the following patch, which is designed to keep the entry in /etc/hosts for the current DHCP IP address up to date. Without a valid entry in /etc/hosts for the hostname, various tools fail to work properly (one of which is pppd when used as a server rather than a client,