diff --git a/net/mwan3/Makefile b/net/mwan3/Makefile index 78eba0f12..87ad0e8a1 100644 --- a/net/mwan3/Makefile +++ b/net/mwan3/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=mwan3 -PKG_VERSION:=2.10.4 +PKG_VERSION:=2.10.5 PKG_RELEASE:=1 PKG_MAINTAINER:=Florian Eckert , \ Aaron Goodman @@ -102,6 +102,10 @@ define Package/mwan3/install $(INSTALL_BIN) ./files/usr/sbin/mwan3track \ $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc + $(INSTALL_BIN) ./files/etc/mwan3.user \ + $(1)/etc/ + $(CP) $(PKG_BUILD_DIR)/libwrap_mwan3_sockopt.so.1.0 $(1)/lib/mwan3/ $(INSTALL_DIR) $(1)/etc/uci-defaults diff --git a/net/mwan3/files/etc/hotplug.d/iface/15-mwan3 b/net/mwan3/files/etc/hotplug.d/iface/15-mwan3 index f9212a3a6..32497a5a0 100644 --- a/net/mwan3/files/etc/hotplug.d/iface/15-mwan3 +++ b/net/mwan3/files/etc/hotplug.d/iface/15-mwan3 @@ -19,7 +19,7 @@ if { [ "$ACTION" = "ifup" ] || [ "$ACTION" = "connected" ] ; } && [ -z "$DEVICE" exit 3 fi -[ "$MWAN3_STARTUP" = 1 ] || procd_lock +[ "$MWAN3_STARTUP" = "init" ] || procd_lock config_load mwan3 /etc/init.d/mwan3 running || { diff --git a/net/mwan3/files/etc/hotplug.d/iface/16-mwan3-user b/net/mwan3/files/etc/hotplug.d/iface/16-mwan3-user index be857e8ff..ea509acc8 100644 --- a/net/mwan3/files/etc/hotplug.d/iface/16-mwan3-user +++ b/net/mwan3/files/etc/hotplug.d/iface/16-mwan3-user @@ -3,7 +3,7 @@ [ -f "/etc/mwan3.user" ] && { . /lib/functions.sh . /lib/mwan3/mwan3.sh - initscript=/etc/init.d/mwan3 + initscript=/etc/init.d/mwan3 . /lib/functions/procd.sh [ "$MWAN3_SHUTDOWN" != 1 ] && procd_lock @@ -16,7 +16,6 @@ config_get_bool enabled "$INTERFACE" enabled 0 [ "${enabled}" -eq 1 ] || { - [ "$MWAN3_SHUTDOWN" != 1 ] && mwan3_unlock "$ACTION" "$DEVICE-user" exit 0 } diff --git a/net/mwan3/files/etc/init.d/mwan3 b/net/mwan3/files/etc/init.d/mwan3 index fe97b6a08..c34dda767 100755 --- a/net/mwan3/files/etc/init.d/mwan3 +++ b/net/mwan3/files/etc/init.d/mwan3 @@ -6,6 +6,7 @@ START=19 USE_PROCD=1 +SCRIPTNAME="mwan3-init" service_running() { [ -d "$MWAN3_STATUS_DIR" ] diff --git a/net/mwan3/files/lib/mwan3/mwan3.sh b/net/mwan3/files/lib/mwan3/mwan3.sh index 6821b8503..b99f28231 100644 --- a/net/mwan3/files/lib/mwan3/mwan3.sh +++ b/net/mwan3/files/lib/mwan3/mwan3.sh @@ -79,7 +79,7 @@ mwan3_route_line_dev() unset "$1" [ -z "$route_device" ] && return - curr_table=$(eval "echo \"\$mwan3_dev_tbl_${route_family}\"") + curr_table=$(eval "echo \"\$mwan3_dev_tbl_${route_family}\"") for entry in $curr_table; do if [ "${entry%%=*}" = "$route_device" ]; then _tid=${entry##*=} diff --git a/net/mwan3/files/usr/sbin/mwan3rtmon b/net/mwan3/files/usr/sbin/mwan3rtmon index f916f4a9c..96a774783 100755 --- a/net/mwan3/files/usr/sbin/mwan3rtmon +++ b/net/mwan3/files/usr/sbin/mwan3rtmon @@ -56,7 +56,7 @@ mwan3_add_all_routes() tid=0 active_tbls=" " config_foreach add_active_tbls interface - [ $active_tbls = " " ] && return + [ "$active_tbls" = " " ] && return mwan3_get_routes | while read -r route_line; do mwan3_route_line_dev "tid" "$route_line" "$ipv" if [ -n "$tid" ] && [ -z "${active_tbls##* $tid *}" ]; then