From: Fabian Groffen Date: Tue, 2 Sep 2025 11:19:55 +0000 (+0200) Subject: mwan3: common.sh: fix sed syntax for GNU sed X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=f933e028f502e9fc5c6bbf1176057253dd02a4e9;p=feed%2Fpackages.git mwan3: common.sh: fix sed syntax for GNU sed `pq' yields with GNU sed: sed: -e expression #1, char 15: extra characters after command so, make q a separate command instead. busybox accepts this too, and still returns only the first match (q quits processing) Signed-off-by: Fabian Groffen --- diff --git a/net/mwan3/files/lib/mwan3/common.sh b/net/mwan3/files/lib/mwan3/common.sh index b99ccfd0e8..8b4adbdf08 100644 --- a/net/mwan3/files/lib/mwan3/common.sh +++ b/net/mwan3/files/lib/mwan3/common.sh @@ -63,12 +63,12 @@ mwan3_get_src_ip() if [ "$family" = "ipv4" ]; then addr_cmd='network_get_ipaddr' default_ip="0.0.0.0" - sed_str='s/ *inet \([^ \/]*\).*/\1/;T; pq' + sed_str='s/ *inet \([^ \/]*\).*/\1/;T;p;q' IP="$IP4" elif [ "$family" = "ipv6" ]; then addr_cmd='network_get_ipaddr6' default_ip="::" - sed_str='s/ *inet6 \([^ \/]*\).* scope.*/\1/;T; pq' + sed_str='s/ *inet6 \([^ \/]*\).* scope.*/\1/;T;p;q' IP="$IP6" fi