mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
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>
This commit is contained in:
@@ -46,7 +46,7 @@ mwan3_rtmon_ipv4()
|
|||||||
idx=$((idx+1))
|
idx=$((idx+1))
|
||||||
tid=$idx
|
tid=$idx
|
||||||
[ "$(uci get mwan3.@interface[$((idx-1))].family)" = "ipv4" ] && {
|
[ "$(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
|
if echo "$tbl" | grep -q ^default; then
|
||||||
(echo "$tbl" | grep -v "^default\|linkdown" | sort -n; echo empty fixup) >/tmp/mwan3rtmon/ipv4.$tid
|
(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
|
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))
|
idx=$((idx+1))
|
||||||
tid=$idx
|
tid=$idx
|
||||||
[ "$(uci get mwan3.@interface[$((idx-1))].family)" = "ipv6" ] && {
|
[ "$(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
|
if echo "$tbl" | grep -q "^default\|^::/0"; then
|
||||||
(echo "$tbl" | grep -v "^default\|^::/0\|^unreachable" | sort -n; echo empty fixup) >/tmp/mwan3rtmon/ipv6.$tid
|
(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
|
cat /tmp/mwan3rtmon/ipv6.$tid | grep -v -x -F -f /tmp/mwan3rtmon/ipv6.main | while read line; do
|
||||||
|
|||||||
Reference in New Issue
Block a user