From mboxrd@z Thu Jan  1 00:00:00 1970
From: Adolf Belka <adolf.belka@ipfire.org>
To: development@lists.ipfire.org
Subject: [PATCH 2/2] update.sh: Remove existing entries for the three FEODO_
 tracker lists
Date: Wed, 16 Oct 2024 18:50:20 +0200
Message-ID: <20241016165020.9287-2-adolf.belka@ipfire.org>
In-Reply-To: <20241016165020.9287-1-adolf.belka@ipfire.org>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============3849166113818459541=="
List-Id: <development.lists.ipfire.org>

--===============3849166113818459541==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

- This removes any time entries in the modified file for either FEODO_RECOMME=
NDED,
   FEODO_IP or FEODO_AGGRESSIVE.
- This also removes any blocklists for any of these sources from the /var/lib=
/ipblocklist
   directory.
- This patch will ensure that any reference to any of these sources is remove=
d from the
   ipblocklist files.

Signed-off-by: Adolf Belka <adolf.belka(a)ipfire.org>
---
 config/rootfiles/core/190/update.sh | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/config/rootfiles/core/190/update.sh b/config/rootfiles/core/190/=
update.sh
index 16ef608e2..cec9492eb 100644
--- a/config/rootfiles/core/190/update.sh
+++ b/config/rootfiles/core/190/update.sh
@@ -145,6 +145,21 @@ if [ -e /boot/pakfire-kernel-update ]; then
     /boot/pakfire-kernel-update ${KVER}
 fi
=20
+# Remove any entry for FEODO_RECOMMENDED, FEODO_IP or FEODO_AGGRESSIVE from =
the ipblocklist
+# modified file and the associated ipblocklist files from the /var/lib/ipblo=
cklist directory
+sed -i '/FEODO_RECOMMENDED=3D/d' /var/ipfire/ipblocklist/modified
+sed -i '/FEODO_IP=3D/d' /var/ipfire/ipblocklist/modified
+sed -i '/FEODO_AGGRESSIVE=3D/d' /var/ipfire/ipblocklist/modified
+if [ -e /var/lib/ipblocklist/FEODO_RECOMMENDED.conf ]; then
+	rm /var/lib/ipblocklist/FEODO_RECOMMENDED.conf
+fi
+if [ -e /var/lib/ipblocklist/FEODO_IP.conf ]; then
+	rm /var/lib/ipblocklist/FEODO_IP.conf
+fi
+if [ -e /var/lib/ipblocklist/FEODO_AGGRESSIVE.conf ]; then
+	rm /var/lib/ipblocklist/FEODO_AGGRESSIVE.conf
+fi
+
 # This update needs a reboot...
 touch /var/run/need_reboot
=20
--=20
2.47.0


--===============3849166113818459541==--