fixes for static .. gateway & resolv
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10 3c298f89-4303-0410-b956-a3cf2f4a3e73master
parent
d96a4a5097
commit
b50b1d69ed
|
@ -84,8 +84,15 @@ configure () {
|
||||||
ipcalc -s "$if_netmask" || return
|
ipcalc -s "$if_netmask" || return
|
||||||
$DEBUG ifconfig $if $if_ip netmask $if_netmask up
|
$DEBUG ifconfig $if $if_ip netmask $if_netmask up
|
||||||
|
|
||||||
ipcalc -s "$ip_gateway" || return
|
ipcalc -s "$if_gateway" || return
|
||||||
$DEBUG route add default gw $ip_gateway
|
$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)
|
dhcp)
|
||||||
pidfile=/tmp/dhcp-${type}.pid
|
pidfile=/tmp/dhcp-${type}.pid
|
||||||
|
|
Loading…
Reference in New Issue