From patchwork Wed Dec 25 13:48:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 8370 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4YJClj3KJ7z3wxg for ; Wed, 25 Dec 2024 13:48:49 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) client-signature ECDSA (secp384r1)) (Client CN "mail02.haj.ipfire.org", Issuer "E6" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4YJCld0qqlz4gT; Wed, 25 Dec 2024 13:48:45 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4YJCld07dpz34LL; Wed, 25 Dec 2024 13:48:45 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) client-signature RSA-PSS (4096 bits)) (Client CN "mail01.haj.ipfire.org", Issuer "R11" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4YJClV4rcVz3458 for ; Wed, 25 Dec 2024 13:48:38 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4YJClV0C9pz1FV; Wed, 25 Dec 2024 13:48:38 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1735134518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0E3A4Wkt8qr4d/FtXI97nRPuN6GYy23QYTWGqrQuAWU=; b=MpXbEWFqbY5n6+zACave0QwTbuHHTYqhE8vv4KhB3BvJ5ccAEBCAhK5bAh8kDr2UOCvWrP vN/D/lWgyw/55yCg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1735134518; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0E3A4Wkt8qr4d/FtXI97nRPuN6GYy23QYTWGqrQuAWU=; b=qtknIC3VPj6u7195CfSjCUxQmPA0RJYf87ja00NC8cUeo7hUrDvZ7jNSCnDXHfdpXRMnin EgvdB2MVCaM3jazVsPWG25JZuJ+hs7Mj5L2Btf5/TTjGS8Bk41jJ0B96uOGQDjbUfTFdsy ngztbYAZEbTRRWm/AlpCe8H1vR0F1ymIKeF8K64rN3LJcE+apQc53Gkugyg/iteCUHygEp grU3nZEIAtQf51YLLDmxC1KWymb+mnNMdq1EX+DFOn9CtF3sJhTEvkfsNhc/56+lMkwxZp bMN2FyEVTQQNihzzw6uf1Tp6Kd3cE8ga9lfxZI9VAOVFdMsSGttrkWh76T2XiQ== From: Adolf Belka To: development@lists.ipfire.org Subject: [PATCH 5/7] update.sh: Update to migrate rrd directories for collectd-5.x Date: Wed, 25 Dec 2024 14:48:26 +0100 Message-ID: <20241225134828.6231-5-adolf.belka@ipfire.org> In-Reply-To: <20241225134828.6231-1-adolf.belka@ipfire.org> References: <20241225134828.6231-1-adolf.belka@ipfire.org> MIME-Version: 1.0 Message-ID-Hash: GZT3ELRPNHLGZH5MCMQYT6FLA3WAGVAJ X-Message-ID-Hash: GZT3ELRPNHLGZH5MCMQYT6FLA3WAGVAJ X-MailFrom: adolf.belka@ipfire.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: IPFire development talk Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: - 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 --- config/rootfiles/core/191/update.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/config/rootfiles/core/191/update.sh b/config/rootfiles/core/191/update.sh index a2d61ec52..fb06896d9 100644 --- a/config/rootfiles/core/191/update.sh +++ b/config/rootfiles/core/191/update.sh @@ -72,6 +72,15 @@ telinit u /etc/init.d/unbound restart /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 + # This update needs a reboot... touch /var/run/need_reboot