From 0bbe55ca3db07b5f0dafc9118d33e16987e0eaa7 Mon Sep 17 00:00:00 2001
From: David Bauer <mail@david-bauer.net>
Date: Tue, 5 Mar 2024 12:03:42 +0100
Subject: [PATCH] gluon-ebtables-limit-arp: stop for autoupdater (#3162)

Stop and start the gluon-arp-limiter service before the network is
brought down when commencing update.

Start the service after the network is brought back up when aborting.

Signed-off-by: David Bauer <mail@david-bauer.net>
---
 .../files/usr/lib/autoupdater/abort.d/15start-arp-limiter   | 6 ++++++
 .../files/usr/lib/autoupdater/upgrade.d/05stop-arp-limiter  | 6 ++++++
 2 files changed, 12 insertions(+)
 create mode 100755 package/gluon-ebtables-limit-arp/files/usr/lib/autoupdater/abort.d/15start-arp-limiter
 create mode 100755 package/gluon-ebtables-limit-arp/files/usr/lib/autoupdater/upgrade.d/05stop-arp-limiter

diff --git a/package/gluon-ebtables-limit-arp/files/usr/lib/autoupdater/abort.d/15start-arp-limiter b/package/gluon-ebtables-limit-arp/files/usr/lib/autoupdater/abort.d/15start-arp-limiter
new file mode 100755
index 000000000..982629c4f
--- /dev/null
+++ b/package/gluon-ebtables-limit-arp/files/usr/lib/autoupdater/abort.d/15start-arp-limiter
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+. /lib/gluon/autoupdater/lib.sh
+
+# Start after network
+start_enabled gluon-arp-limiter
diff --git a/package/gluon-ebtables-limit-arp/files/usr/lib/autoupdater/upgrade.d/05stop-arp-limiter b/package/gluon-ebtables-limit-arp/files/usr/lib/autoupdater/upgrade.d/05stop-arp-limiter
new file mode 100755
index 000000000..f9fdbd5c4
--- /dev/null
+++ b/package/gluon-ebtables-limit-arp/files/usr/lib/autoupdater/upgrade.d/05stop-arp-limiter
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+. /lib/gluon/autoupdater/lib.sh
+
+# Stop before network
+stop gluon-arp-limiter
-- 
GitLab