Browse Source

mwan3: move redirect error output to trash

This suppress the following output on `mwan3 restart`:
> Dump terminated

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
lilik-openwrt-22.03
Florian Eckert 4 years ago
parent
commit
facf8ea299
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      net/mwan3/files/lib/mwan3/mwan3.sh

+ 2
- 2
net/mwan3/files/lib/mwan3/mwan3.sh View File

@ -46,7 +46,7 @@ mwan3_rtmon_ipv4()
idx=$((idx+1))
tid=$idx
[ "$(uci get mwan3.@interface[$((idx-1))].family)" = "ipv4" ] && {
tbl=$($IP4 route list table $tid)
tbl=$($IP4 route list table $tid 2>/dev/null)
if echo "$tbl" | grep -q ^default; then
(echo "$tbl" | grep -v "^default\|linkdown" | sort -n; echo empty fixup) >/tmp/mwan3rtmon/ipv4.$tid
cat /tmp/mwan3rtmon/ipv4.$tid | grep -v -x -F -f /tmp/mwan3rtmon/ipv4.main | while read line; do
@ -79,7 +79,7 @@ mwan3_rtmon_ipv6()
idx=$((idx+1))
tid=$idx
[ "$(uci get mwan3.@interface[$((idx-1))].family)" = "ipv6" ] && {
tbl=$($IP6 route list table $tid)
tbl=$($IP6 route list table $tid 2>/dev/null)
if echo "$tbl" | grep -q "^default\|^::/0"; then
(echo "$tbl" | grep -v "^default\|^::/0\|^unreachable" | sort -n; echo empty fixup) >/tmp/mwan3rtmon/ipv6.$tid
cat /tmp/mwan3rtmon/ipv6.$tid | grep -v -x -F -f /tmp/mwan3rtmon/ipv6.main | while read line; do


Loading…
Cancel
Save