diff options
author | mbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2004-04-13 04:38:04 +0000 |
---|---|---|
committer | mbm <mbm@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2004-04-13 04:38:04 +0000 |
commit | 15f61ce088e6eb642caf493bfb7951abd3a87765 (patch) | |
tree | e2b583287b9e55d0747d16d37d556f75ec7610f1 /root/etc | |
parent | 6df94d637aa12a0161666ad8af09542d39855e52 (diff) |
fixes for static .. gateway & resolv
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'root/etc')
-rwxr-xr-x | root/etc/networking.sh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/root/etc/networking.sh b/root/etc/networking.sh index c1e6742e3..6eb967b14 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 |