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)
-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
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
-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
-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
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,