mkdir -p $(IDIR_BASE)/usr/bin
mkdir -p $(IDIR_BASE)/www
rm -f $(IDIR_BASE)/var
+ rm -f $(IDIR_BASE)/etc/resolv.conf
+ ln -sf /tmp/resolv.conf $(IDIR_BASE)/etc/resolv.conf
ln -sf /tmp $(IDIR_BASE)/var
-find $(IDIR_BASE) -type d -name CVS | xargs rm -rf
-find $(IDIR_BASE) -type d -name .svn | xargs rm -rf
case "$file" in
./rom/note) ;; #nothing
./etc/config*|\
- ./etc/resolv.conf|\
./usr/lib/ipkg/info/*) cp -af $2/$file $file;;
*) ln -sf /rom/${file#./*} $file;;
esac
} done
}
- [ -f /tmp/resolv.conf ] || {
- debug "# --- creating /tmp/resolv.conf ---"
+ [ -f /tmp/resolv.conf.auto ] || {
+ debug "# --- creating /tmp/resolv.conf.auto ---"
for dns in $(nvram get ${2}_dns); do
- echo "nameserver $dns" >> /tmp/resolv.conf
+ echo "nameserver $dns" >> /tmp/resolv.conf.auto
done
}
#!/bin/sh
case "$1" in
start|restart)
+ rm -f /tmp/resolv.conf
+ ln -s /tmp/resolv.conf.auto /tmp/resolv.conf
ifup_interfaces=$(nvram get ifup_interfaces)
ifup_interfaces=${ifup_interfaces:-"lan wan wifi"}
for iface in $ifup_interfaces; do
+++ /dev/null
-nameserver 127.0.0.1
-search lan
#!/bin/sh
[ -z "$1" ] && echo "Error: should be run by udhcpc" && exit 1
-RESOLV_CONF="/tmp/resolv.conf"
+RESOLV_CONF="/tmp/resolv.conf.auto"
hotplug_event() {
nvram show 2>&- | grep _proto=dhcp | {
wanproto=$(nvram get wan_proto)
[ -z "$wanproto" -o "$wanproto" = "none" ] || args="${args} -I $(nvram get wan_ifname)"
-dnsmasq ${args}
+dnsmasq ${args} && {
+ # use dnsmasq for local dns requests
+ rm -f /tmp/resolv.conf
+ cat > /tmp/resolv.conf <<EOF
+nameserver 127.0.0.1
+search lan
+EOF
+}
domain=lan
expand-hosts
no-negcache
-resolv-file=/tmp/resolv.conf
+resolv-file=/tmp/resolv.conf.auto
# enable dhcp (start,end,netmask,leasetime)
dhcp-authoritative
$(IPKG_PPP):
install -d -m0755 $(IDIR_PPP)/etc/ppp
- ln -sf /tmp/resolv.conf $(IDIR_PPP)/etc/ppp/resolv.conf
+ ln -sf /tmp/resolv.conf.auto $(IDIR_PPP)/etc/ppp/resolv.conf
install -m0600 ./files/etc/ppp/chap-secrets $(IDIR_PPP)/etc/ppp/
install -m0644 ./files/etc/ppp/options $(IDIR_PPP)/etc/ppp/
$(INSTALL_FILTER)