public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Adolf Belka <adolf.belka@ipfire.org>
To: development@lists.ipfire.org
Cc: Adolf Belka <adolf.belka@ipfire.org>
Subject: [PATCH 3/4] update.sh: Core195 - remove any 3coresec ipblocklists during Core Update
Date: Thu, 24 Apr 2025 16:20:40 +0200	[thread overview]
Message-ID: <20250424142041.3443255-3-adolf.belka@ipfire.org> (raw)
In-Reply-To: <20250424142041.3443255-1-adolf.belka@ipfire.org>

- This ensures that any existing 3coresec blocklists that might have been selected
   when they existed will be removed from users systems.

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

diff --git a/config/rootfiles/core/195/update.sh b/config/rootfiles/core/195/update.sh
index ee9b53497..e934693cd 100644
--- a/config/rootfiles/core/195/update.sh
+++ b/config/rootfiles/core/195/update.sh
@@ -47,6 +47,21 @@ ldconfig
 # Filesytem cleanup
 /usr/local/bin/filesystem-cleanup
 
+# Remove any entry for 3CORESEC_SSH, 3CORESEC_SCAN or 3CORESEC_WEB from the ipblocklist modified file
+# and the associated ipblocklist files from the /var/lib/ipblocklist directory
+sed -i '/3CORESEC_SSH=/d' /var/ipfire/ipblocklist/modified
+if [ -e /var/lib/ipblocklist/3CORESEC_SSH.conf ]; then
+	rm /var/lib/ipblocklist/3CORESEC_SSH.conf
+fi
+sed -i '/3CORESEC_SCAN=/d' /var/ipfire/ipblocklist/modified
+if [ -e /var/lib/ipblocklist/3CORESEC_SCAN.conf ]; then
+	rm /var/lib/ipblocklist/3CORESEC_SCAN.conf
+fi
+sed -i '/3CORESEC_WEB=/d' /var/ipfire/ipblocklist/modified
+if [ -e /var/lib/ipblocklist/3CORESEC_WEB.conf ]; then
+	rm /var/lib/ipblocklist/3CORESEC_WEB.conf
+fi
+
 # Start services
 
 # This update needs a reboot...
-- 
2.49.0



  parent reply	other threads:[~2025-04-24 14:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-24 14:20 [PATCH 1/4] sources: remove the 3CORESEC ipblocklist entries from the sources file Adolf Belka
2025-04-24 14:20 ` [PATCH 2/4] backup.pl: Remove any 3coresec ipblocklists from old backups being restored Adolf Belka
2025-04-24 14:20 ` Adolf Belka [this message]
2025-04-24 14:20 ` [PATCH 4/4] core195: Ship backup.pl and sources files Adolf Belka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250424142041.3443255-3-adolf.belka@ipfire.org \
    --to=adolf.belka@ipfire.org \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox