net/mwan3: mwan3track should also send disconnected action on signal USR1
authorFlorian Eckert <fe@dev.tdt.de>
Thu, 21 Jun 2018 11:14:12 +0000 (13:14 +0200)
committerFlorian Eckert <fe@dev.tdt.de>
Mon, 24 Sep 2018 08:20:35 +0000 (10:20 +0200)
Also send disconnected action on system signal USR1.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
net/mwan3/files/usr/sbin/mwan3track

index 923bd7bfaf2c4696faf48f6020a3678cd1dca49e..c2ebb3e9f5008b10d6f03cb449d790d676b6f6b8 100755 (executable)
@@ -239,8 +239,10 @@ main() {
                wait
 
                if [ "${IFDOWN_EVENT}" -eq 1 ]; then
-                       score=0
                        echo "offline" > /var/run/mwan3track/$1/STATUS
+                       $LOG notice "Interface $1 ($2) is offline"
+                       env -i ACTION="disconnected" INTERFACE="$1" DEVICE="$2" /sbin/hotplug-call iface
+                       score=0
                        IFDOWN_EVENT=0
                fi
        done