mwan3: write `mwan3 use` error/debug messages to stderr instead of stdout
authorPhilipp Schmitt <philipp@schmitt.co>
Tue, 18 Feb 2025 16:41:22 +0000 (17:41 +0100)
committerFlorian Eckert <Eckert.Florian@googlemail.com>
Thu, 20 Feb 2025 10:10:34 +0000 (11:10 +0100)
commit3f7c3ee7f751ba0d4d247ce43eb23406bf3ef7e1
tree3b0ed76e1043c2c8968158412ab7db42c7776503
parent00f28b82816bdabdaf194cbdb5b2d8a012ad9fa0
mwan3: write `mwan3 use` error/debug messages to stderr instead of stdout

This redirects the debug output to stderr, allowing `mwan3 use` to be used in
scripts without polluting stdout.

Before:

mwan3 use wan curl -fsSL https://ifconfig.co/json | jq -er '.country_iso'
jq: parse error: Invalid numeric literal at line 1, column 8
curl: (23) Failure writing output to destination, passed 389 returned 0

After:

mwan3 use wan curl -fsSL https://ifconfig.co/json | jq -er '.country_iso'
Running 'curl -fsSL https://ifconfig.co/json' with DEVICE=eth2 SRCIP=192.168.0.1 FWMARK=0x3f00 FAMILY=ipv4
DE

Signed-off-by: Philipp Schmitt <philipp@schmitt.co>
net/mwan3/Makefile
net/mwan3/files/usr/sbin/mwan3