From 459b8be491a13595c48b2c8e2e364b3027f6d59e Mon Sep 17 00:00:00 2001 From: Mike Baker Date: Tue, 13 Apr 2004 04:38:04 +0000 Subject: [PATCH] fixes for static .. gateway & resolv SVN-Revision: 10 --- root/etc/networking.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/root/etc/networking.sh b/root/etc/networking.sh index c1e6742e36..6eb967b14c 100755 --- a/root/etc/networking.sh +++ b/root/etc/networking.sh @@ -84,8 +84,15 @@ configure () { ipcalc -s "$if_netmask" || return $DEBUG ifconfig $if $if_ip netmask $if_netmask up - ipcalc -s "$ip_gateway" || return - $DEBUG route add default gw $ip_gateway + ipcalc -s "$if_gateway" || return + $DEBUG route add default gw $if_gateway + + [ -f /etc/resolv.conf ] && return + + echo "# --- creating /etc/resolv.conf ---" + for dns in $(nvram_get ${if}_dns); do { + echo "nameserver $dns" >> /etc/resolv.conf + }; done ;; dhcp) pidfile=/tmp/dhcp-${type}.pid