From 1f1d21ed28c7e6713fb010e380b8557a9d020b16 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Wed, 4 Nov 2020 16:24:55 +0100 Subject: mwan3: make it clearer who initiated the start It was somewhat opaque how the variable a is questioned. To show this better the variable is now a string and not a boolean. So you can see directly what should happen. With a boolean you always have to think about what it means when 0 or 1 is used. Signed-off-by: Florian Eckert --- net/mwan3/files/etc/hotplug.d/iface/15-mwan3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'net/mwan3/files/etc/hotplug.d') diff --git a/net/mwan3/files/etc/hotplug.d/iface/15-mwan3 b/net/mwan3/files/etc/hotplug.d/iface/15-mwan3 index 5fe3e33e0..f1755d26f 100644 --- a/net/mwan3/files/etc/hotplug.d/iface/15-mwan3 +++ b/net/mwan3/files/etc/hotplug.d/iface/15-mwan3 @@ -23,7 +23,7 @@ fi config_load mwan3 /etc/init.d/mwan3 running || { - [ "$MWAN3_STARTUP" = 1 ] || procd_lock + [ "$MWAN3_STARTUP" = "init" ] || procd_lock LOG notice "mwan3 hotplug $ACTION on $INTERFACE not called because globally disabled" mwan3_flush_conntrack "$INTERFACE" "$ACTION" exit 0 @@ -69,7 +69,7 @@ case "$ACTION" in mwan3_create_iface_iptables $INTERFACE $DEVICE mwan3_create_iface_rules $INTERFACE $DEVICE mwan3_set_iface_hotplug_state $INTERFACE "$status" - if [ "$MWAN3_STARTUP" != 1 ]; then + if [ "$MWAN3_STARTUP" = "cmd" ]; then mwan3_create_iface_route $INTERFACE $DEVICE mwan3_set_general_rules [ "$status" = "online" ] && mwan3_set_policies_iptables -- cgit v1.2.3