From 53f535f7ccfeaf191c11350f422b062b68870ae3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sat, 15 May 2021 13:16:12 +0200 Subject: firewall: add to test --- firewall/files/firewall.hotplug | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 firewall/files/firewall.hotplug (limited to 'firewall/files/firewall.hotplug') diff --git a/firewall/files/firewall.hotplug b/firewall/files/firewall.hotplug new file mode 100644 index 0000000..f1eab00 --- /dev/null +++ b/firewall/files/firewall.hotplug @@ -0,0 +1,11 @@ +#!/bin/sh + +[ "$ACTION" = ifup -o "$ACTION" = ifupdate ] || exit 0 +[ "$ACTION" = ifupdate -a -z "$IFUPDATE_ADDRESSES" -a -z "$IFUPDATE_DATA" ] && exit 0 + +/etc/init.d/firewall enabled || exit 0 + +fw3 -q network "$INTERFACE" >/dev/null || exit 0 + +logger -t firewall "Reloading firewall due to $ACTION of $INTERFACE ($DEVICE)" +fw3 -q reload -- cgit v1.2.3