diff options
author | Mike Baker <mbm@openwrt.org> | 2004-04-13 04:38:04 +0000 |
---|---|---|
committer | Mike Baker <mbm@openwrt.org> | 2004-04-13 04:38:04 +0000 |
commit | 459b8be491a13595c48b2c8e2e364b3027f6d59e (patch) | |
tree | e2b583287b9e55d0747d16d37d556f75ec7610f1 | |
parent | 1862aca3212c3c845214ec1dd9ddd11b7c8b48f3 (diff) | |
download | mtk-20170518-459b8be491a13595c48b2c8e2e364b3027f6d59e.zip mtk-20170518-459b8be491a13595c48b2c8e2e364b3027f6d59e.tar.gz mtk-20170518-459b8be491a13595c48b2c8e2e364b3027f6d59e.tar.bz2 |
fixes for static .. gateway & resolv
SVN-Revision: 10
-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 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 |