diff options
author | Florian Eckert <fe@dev.tdt.de> | 2018-03-06 15:44:50 +0100 |
---|---|---|
committer | Florian Eckert <fe@dev.tdt.de> | 2018-03-16 14:44:04 +0100 |
commit | 4f1e85bd8cc8133e978e94bdccded514582e1aa3 (patch) | |
tree | dd4dd2e35677cc4c6dc0a95ef325817386bd2012 /net | |
parent | ce8cde62e15e9930d9ea664dc6887a085cd632ec (diff) |
net/mwan3: add connected/disconnected ACTION to mwan3track
Add a new ACTIONs:
* connected ACTION is called once if mwan3track reach all configured track_ips
* disconnected ACTION is called once if mwan3track is unable to reach the track_ips
The connected/disconnected will called only by mwan3track in opposite
the ACTIONs ifup/ifdown will also be called by netifd.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Diffstat (limited to 'net')
-rwxr-xr-x | net/mwan3/files/usr/sbin/mwan3track | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/mwan3/files/usr/sbin/mwan3track b/net/mwan3/files/usr/sbin/mwan3track index 2e6f0ffdd..e8080b59c 100755 --- a/net/mwan3/files/usr/sbin/mwan3track +++ b/net/mwan3/files/usr/sbin/mwan3track @@ -142,6 +142,7 @@ main() { echo "offline" > /var/run/mwan3track/$1/STATUS $LOG notice "Interface $1 ($2) is offline" env -i ACTION=ifdown INTERFACE=$1 DEVICE=$2 /sbin/hotplug-call iface + env -i ACTION="disconnected" INTERFACE="$1" DEVICE="$2" /sbin/hotplug-call iface score=0 fi else @@ -162,6 +163,7 @@ main() { if [ $score -eq $up ]; then $LOG notice "Interface $1 ($2) is online" echo "online" > /var/run/mwan3track/$1/STATUS + env -i ACTION="connected" INTERFACE="$1" DEVICE="$2" /sbin/hotplug-call iface env -i ACTION=ifup INTERFACE=$1 DEVICE=$2 /sbin/hotplug-call iface exit 0 fi |