1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Update openmptcprouter script and config to use device setting instead of ifname

This commit is contained in:
Ycarus (Yannick Chabanois) 2021-06-25 19:48:43 +02:00
parent c5945ec683
commit ea3a4840c4
7 changed files with 33 additions and 31 deletions

View file

@ -1,8 +1,8 @@
#!/bin/sh
if [ "$(uci -q get openmptcprouter.settings.version)" = "" ]; then
if [ "$(uci -q get sqm.wan1)" = "" ]; then
wan1="$(uci -q get network.wan1.ifname)"
wan2="$(uci -q get network.wan2.ifname)"
wan1="$(uci -q get network.wan1.device)"
wan2="$(uci -q get network.wan2.device)"
uci -q batch <<-EOF >/dev/null
delete sqm.eth1
set sqm.wan1=queue
@ -34,7 +34,7 @@ if [ "$(uci -q get openmptcprouter.settings.version)" = "" ]; then
commit sqm
EOF
if [ "$(uci -q get network.wan3)" != "" ]; then
wan3="$(uci -q get network.wan3.ifname)"
wan3="$(uci -q get network.wan3.device)"
uci -q batch <<-EOF >/dev/null
set sqm.wan3=queue
set sqm.wan3.qdisc="fq_codel"
@ -53,7 +53,7 @@ if [ "$(uci -q get openmptcprouter.settings.version)" = "" ]; then
EOF
fi
if [ "$(uci -q get network.wan4)" != "" ]; then
wan4="$(uci -q get network.wan4.ifname)"
wan4="$(uci -q get network.wan4.device)"
uci -q batch <<-EOF >/dev/null
set sqm.wan4=queue
set sqm.wan4.qdisc="fq_codel"