mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-12 18:41:51 +00:00
Force lan interface device on initial config
This commit is contained in:
parent
aa0f3ef0f5
commit
fafeaf7502
1 changed files with 9 additions and 0 deletions
|
@ -65,6 +65,7 @@ _setup_wan_interface() {
|
||||||
set network.$1.defaultroute=0
|
set network.$1.defaultroute=0
|
||||||
set network.$1.delegate=0
|
set network.$1.delegate=0
|
||||||
set network.$1.addlatency=0
|
set network.$1.addlatency=0
|
||||||
|
delete network.$1.ifname
|
||||||
set network.${1}_dev=device
|
set network.${1}_dev=device
|
||||||
set network.${1}_dev.name=$2
|
set network.${1}_dev.name=$2
|
||||||
set network.${1}_dev.txqueuelen=1000
|
set network.${1}_dev.txqueuelen=1000
|
||||||
|
@ -195,6 +196,9 @@ set network.lan.delegate=0
|
||||||
set network.lan.addlatency=0
|
set network.lan.addlatency=0
|
||||||
set network.lan.txqueuelen=2000
|
set network.lan.txqueuelen=2000
|
||||||
set dhcp.lan.dhcpv4='server'
|
set dhcp.lan.dhcpv4='server'
|
||||||
|
set network.lan_dev=device
|
||||||
|
set network.lan_dev.name=${lanif}
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
uci -q batch <<-EOF
|
uci -q batch <<-EOF
|
||||||
|
@ -291,6 +295,11 @@ if [ "$(uci -q show network.wan1 | grep multipath)" = "" ] && [ -z "$(uci -q get
|
||||||
_setup_wan_interface wan4 lan4 on
|
_setup_wan_interface wan4 lan4 on
|
||||||
_macaddr=$(uci -q get "network.lan4.macaddr")
|
_macaddr=$(uci -q get "network.lan4.macaddr")
|
||||||
_setup_macaddr "wan4" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}"
|
_setup_macaddr "wan4" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}"
|
||||||
|
if [ -d /sys/class/net/lan5 ] || [ -n "$(ip link | grep ' lan5')" ]; then
|
||||||
|
_setup_wan_interface wan5 lan5 on
|
||||||
|
_macaddr=$(uci -q get "network.lan5.macaddr")
|
||||||
|
_setup_macaddr "wan5" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue