`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 <[email protected]>
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