[WLANware] proper location of resolv.conf
Dan Flett
conhoolio at hotmail.com
Fri Oct 13 07:44:37 CEST 2006
Hi all,
I've noticed what looks like a few inconsistencies in FFF as to where
resolv.conf actually resides.
Currently /etc/resolv.conf symlinks to /var/etc/resolv.conf (via
/rom/etc/resolv.conf)
/sbin/ifup, which uses "INTERFACE_dns" nvram var to statically set a
nameserver points at /etc/resolv.conf
/usr/share/udhcpc/default.script puts dhcp-learned nameservers in
/tmp/resolv.conf
I believe the following changes should be made:
/sbin/ifup should be changed so it writes nameservers directly to
/tmp/resolv.conf
/var/etc/resolv.conf should always symlink to /tmp/resolv.conf as a default
in base-files - this achieves compatibility with openwrt and backwards
compatibility with freifunk firmware
S50dnsmasq should do this:
if ff_dnsmasq != 0
*then*
delete /var/etc/resolv.conf -> /tmp/resolv.conf symlink
/var/etc/resolv.conf should = "nameserver 127.0.0.1"
and /var/etc/dnsmasq.conf should contain
"resolv-file=/tmp/resolv.conf"
Basically this achieves the following:
upstream nameservers should always be stored in /tmp/resolv.conf
if dnsmasq is not installed, the follwoing symlinks would be in place:
/etc/resolv.conf -> /rom/etc/resolv.conf -> /var/etc/resolv.conf ->
/tmp/resolv.conf
if dnsmasq is installed and ff_dnsmasq != 0 the symlinks would work this
way:
/etc/resolv.conf -> /rom/etc/resolv.conf -> /var/etc/resolv.conf =
"nameserver 127.0.0.1"
this points local name resolution at dnsmasq - useful for logging, pinging
hostnames
dnsmasq gets it's upstream nameservers from /tmp/resolv.conf
S50udhcpcd should
Cheers,
Dan
More information about the WLANware
mailing list