From 81e6a8fd3be57cba3b5bcbeb40fbbef52779f70b Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Wed, 4 Nov 2020 11:40:45 +0100 Subject: [PATCH] mwan3: move mwan3_init call in mwwan3track into main Initialize TRACK_OUTPUT has been set after INTERFACE variable initialization. Move definition into main fixes this issue. Signed-off-by: Florian Eckert --- net/mwan3/files/usr/sbin/mwan3track | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/net/mwan3/files/usr/sbin/mwan3track b/net/mwan3/files/usr/sbin/mwan3track index d97933e09b..1cd9e97faa 100755 --- a/net/mwan3/files/usr/sbin/mwan3track +++ b/net/mwan3/files/usr/sbin/mwan3track @@ -9,9 +9,6 @@ DEVICE="" IFDOWN_EVENT=0 IFUP_EVENT=0 -TRACK_OUTPUT=$MWAN3TRACK_STATUS_DIR/$INTERFACE/TRACK_OUTPUT - -mwan3_init stop_subprocs() { [ -n "$SLEEP_PID" ] && kill "$SLEEP_PID" && unset SLEEP_PID @@ -169,6 +166,10 @@ main() { INTERFACE=$1 STATUS="" STARTED=0 + TRACK_OUTPUT=$MWAN3TRACK_STATUS_DIR/$INTERFACE/TRACK_OUTPUT + + mwan3_init + mkdir -p $MWAN3TRACK_STATUS_DIR/$INTERFACE trap clean_up TERM -- 2.30.2