mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
net/mwan3: add lock for mwan3 hotplug script
If more then one interface get up/down at once mwan3 could be in a undefined state, because more then one mwan3 hotplug script are running and editing the iptables. Lock the critical section should solve this issue. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
@@ -38,6 +38,7 @@ if [ "$ACTION" == "ifup" ]; then
|
||||
[ -n "$gateway" ] || exit 9
|
||||
fi
|
||||
|
||||
mwan3_lock
|
||||
$LOG notice "$ACTION interface $INTERFACE (${DEVICE:-unknown})"
|
||||
|
||||
case "$ACTION" in
|
||||
@@ -64,4 +65,6 @@ case "$ACTION" in
|
||||
;;
|
||||
esac
|
||||
|
||||
mwan3_unlock
|
||||
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user