From: Philipp Schmitt Date: Tue, 18 Feb 2025 16:16:45 +0000 (+0100) Subject: mwan3: propagate mwan3 use command exit code X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0c9f4a84101c893b77b8d23b3db4cef00ad18c35;p=feed%2Fpackages.git mwan3: propagate mwan3 use command exit code This propagates the exit code of the command wrapped by `mwan3 use` and allows for example to use `mwan3 use` in monitoring scripts. Before change: shell command: mwan3 use wan false >/dev/null && echo ok || echo fail result: ok After change: shell command: mwan3 use wan false >/dev/null && echo ok || echo fail result: fail Signed-off-by: Philipp Schmitt --- diff --git a/net/mwan3/Makefile b/net/mwan3/Makefile index 1a8a5d3d4a..d951b19178 100644 --- a/net/mwan3/Makefile +++ b/net/mwan3/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mwan3 -PKG_VERSION:=2.11.17 +PKG_VERSION:=2.11.18 PKG_RELEASE:=5 PKG_MAINTAINER:=Florian Eckert , \ Aaron Goodman diff --git a/net/mwan3/files/usr/sbin/mwan3 b/net/mwan3/files/usr/sbin/mwan3 index e884d22f6b..9162cb477c 100755 --- a/net/mwan3/files/usr/sbin/mwan3 +++ b/net/mwan3/files/usr/sbin/mwan3 @@ -241,10 +241,16 @@ use() { } case "$1" in - ifup|ifdown|interfaces|policies|connected|rules|status|start|stop|restart|use|internal) + ifup|ifdown|interfaces|policies|connected|rules|status|start|stop|restart|internal) mwan3_init "$@" ;; + use) + mwan3_init + "$@" + # Propagate mwan3 use command exit code + exit "$?" + ;; *) help ;;