From 083a4a520ef88554850d46925f9160e3d8583267 Mon Sep 17 00:00:00 2001 From: rdevshp Date: Wed, 12 Nov 2025 23:20:58 +0800 Subject: [PATCH] 20-firewall: Execute has_zone and and fw4 in background to avoid slow execution of hotplug scripts Signed-off-by: rdevshp --- root/etc/hotplug.d/iface/20-firewall | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/root/etc/hotplug.d/iface/20-firewall b/root/etc/hotplug.d/iface/20-firewall index d0f030b..ff6efe2 100644 --- a/root/etc/hotplug.d/iface/20-firewall +++ b/root/etc/hotplug.d/iface/20-firewall @@ -10,8 +10,9 @@ has_zone() { [ "$ACTION" = ifupdate -a -z "$IFUPDATE_ADDRESSES" -a -z "$IFUPDATE_DATA" ] && exit 0 /etc/init.d/firewall enabled || exit 0 +( + has_zone || exit 0 -has_zone || exit 0 - -logger -t firewall "Reloading firewall due to $ACTION of $INTERFACE ($DEVICE)" -fw4 -q reload + logger -t firewall "Reloading firewall due to $ACTION of $INTERFACE ($DEVICE)" + fw4 -q reload +) &