mirror of
https://github.com/openwrt/packages.git
synced 2025-12-21 19:14:30 +04:00
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 <philipp@schmitt.co>
This commit is contained in:
committed by
Florian Eckert
parent
0a2746c6d6
commit
0c9f4a8410
@@ -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 <fe@dev.tdt.de>, \
|
||||
Aaron Goodman <aaronjg@alumni.stanford.edu>
|
||||
|
||||
@@ -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
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user