]> git.ipfire.org Git - people/mfischer/ipfire-2.x.git/commitdiff
update.sh: Update to migrate rrd directories for collectd-5.x
authorAdolf Belka <adolf.belka@ipfire.org>
Wed, 25 Dec 2024 13:48:26 +0000 (14:48 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Tue, 21 Jan 2025 18:35:45 +0000 (19:35 +0100)
- Not tested by myself but it uses the same code as in the backup.pl changes which were
   tested and worked. So expectation is that they will work in the Core Update but this
   will be able to be evaluated when the Testing Release is issued.

Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
config/rootfiles/core/192/update.sh

index ca3db5f548cb810de59ec5a7cc00dd33e4be4606..89396e2dfb8380dbe622845906991c6dde794d32 100644 (file)
@@ -100,6 +100,15 @@ ldconfig
 # Start services
 /etc/init.d/suricata restart
 
+# Create collectd 4.x to 5.x migration script from rrd contents, run the script that
+# was created and then remove the old interface directory if it is present as it will
+# be empty after the migration has been carried out.
+/var/ipfire/collectd-migrate-4-to-5.pl --indir /var/log/rrd/ > /tmp/rrd-migrate.sh
+sh /tmp/rrd-migrate.sh >/dev/null 2>&1
+if [ -d /var/log/rrd/collectd/localhost/interface/ ]; then
+       rm -Rf /var/log/rrd/collectd/localhost/interface/
+fi
+
 # Build initial ramdisks
 dracut --regenerate-all --force
 KVER="xxxKVERxxx"