Browse Source

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 <fe@dev.tdt.de>
lilik-openwrt-22.03
Florian Eckert 4 years ago
parent
commit
81e6a8fd3b
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      net/mwan3/files/usr/sbin/mwan3track

+ 4
- 3
net/mwan3/files/usr/sbin/mwan3track View File

@ -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


Loading…
Cancel
Save