net/mwan3: on startup mark interface online only if track_ip are reachable

Add new interface config option "inital_state".

If interface comeing up the first time(mwan3 start, boot),
there are now two option for interface behaviour:

- online (default as is now)
  Set up interface regardless wether tracking ip are reachable or not.

- offline
  Set up interface first to ping tracking ip and if they are reachable set up
  the interface completely.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
Florian Eckert
2017-07-24 10:59:50 +02:00
parent 6d99b602fd
commit 815e83d461
3 changed files with 35 additions and 10 deletions
+1 -1
View File
@@ -457,7 +457,7 @@ mwan3_track()
kill $(pgrep -f "mwan3track $1 $2") &> /dev/null
if [ -n "$track_ips" ]; then
[ -x /usr/sbin/mwan3track ] && /usr/sbin/mwan3track "$1" "$2" "$3" $track_ips &
[ -x /usr/sbin/mwan3track ] && /usr/sbin/mwan3track "$1" "$2" "$3" "$4" $track_ips &
fi
}