net/mwan3: fix hotplug on ACTION ifdown
authorFlorian Eckert <redacted>
Fri, 17 Mar 2017 10:06:24 +0000 (11:06 +0100)
committerFlorian Eckert <redacted>
Fri, 17 Mar 2017 10:06:29 +0000 (11:06 +0100)
On dynamic interface proto (dhcp/pppoe) the hotplug will not execude (exit 9)
because the gateway is already released. The check will now only be made
on a ifup ACTION event.

Signed-off-by: Florian Eckert <redacted>
net/mwan3/files/etc/hotplug.d/iface/15-mwan3

index 7d6cd98c4a1f5292d39696442e99b07c68a15e1d..f5fbc0b9232b0350d56352285a90e1582bf30694 100644 (file)
@@ -30,7 +30,9 @@ elif [ "$family" == "ipv6" ]; then
        network_get_gateway6 gateway $INTERFACE
 fi
 
-[ -n "$gateway" ] || exit 9
+if [ "$ACTION" == "ifup" ]; then
+       [ -n "$gateway" ] || exit 9
+fi
 
 $LOG notice "$ACTION interface $INTERFACE (${DEVICE:-unknown})"
 
git clone https://git.99rst.org/PROJECT