summaryrefslogtreecommitdiff
path: root/root
diff options
context:
space:
mode:
authorMike Baker <mbm@openwrt.org>2004-04-13 04:38:04 +0000
committerMike Baker <mbm@openwrt.org>2004-04-13 04:38:04 +0000
commit459b8be491a13595c48b2c8e2e364b3027f6d59e (patch)
treee2b583287b9e55d0747d16d37d556f75ec7610f1 /root
parent1862aca3212c3c845214ec1dd9ddd11b7c8b48f3 (diff)
downloadmtk-20170518-459b8be491a13595c48b2c8e2e364b3027f6d59e.zip
mtk-20170518-459b8be491a13595c48b2c8e2e364b3027f6d59e.tar.gz
mtk-20170518-459b8be491a13595c48b2c8e2e364b3027f6d59e.tar.bz2
fixes for static .. gateway & resolv
SVN-Revision: 10
Diffstat (limited to 'root')
-rwxr-xr-xroot/etc/networking.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/root/etc/networking.sh b/root/etc/networking.sh
index c1e6742..6eb967b 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