From patchwork Wed Jul 7 17:27:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Peter_M=C3=BCller?= X-Patchwork-Id: 4490 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 (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4GKmZf4FT3z3xCm for ; Wed, 7 Jul 2021 17:27:22 +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 ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4GKmZc4039z14q; Wed, 7 Jul 2021 17:27:20 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4GKmZc1nZyz2xmZ; Wed, 7 Jul 2021 17:27:20 +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 (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4GKmZZ70f8z2xQs for ; Wed, 7 Jul 2021 17:27:18 +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 ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4GKmZY5VrfzZ6 for ; Wed, 7 Jul 2021 17:27:17 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1625678838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SH+zx+rNFFESw3iyEARBlfH2FJKgNR5HxCSlnKNitqw=; b=ErEDF/3xvtutmHZqdfc9b62tyJBY/9VINRcdM/Xca0ZZO9Gs9GUcjJym7vH+8vMnk7MDzp /3OtcqlhtlaVFZBQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1625678838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SH+zx+rNFFESw3iyEARBlfH2FJKgNR5HxCSlnKNitqw=; b=RTD3c6hLnMViIFzrXAcncIhjaZZm/QukCnvB2HL6o9mB0Ljux6e62CdwQ55adhHev3/Tau bBaZF7kHii1FVyN/5bZ6M8dG4ULnKSJ7J1hY8q4GLnt3qVWj8SPLIi4eCrzXN3S2s/1M7z BLKrW/o6mZki6e1MbkUotPXHXlJsy6NCsPzEWi4r8oBKy2bpP0lsDO9YCqVWDYzhQ+/BTO QrKsLWGhn5+hHmT8bOS3XfZvSUE2z/NyyuPn2mQ7XbwycObgI1oBv7/o11S0So3PlebSSE vS2T2yfO2igZ9vXKuBiEF5MVS78bkc8TaozdJAR0Wy8CCbuOCggO6gurFuv+MQ== To: "IPFire: Development" From: =?utf-8?q?Peter_M=C3=BCller?= Subject: [PATCH] Pakfire: call "sync" in function.sh after having extracted archives Message-ID: <472c333c-89ca-97df-9863-683d28d0b7c4@ipfire.org> Date: Wed, 7 Jul 2021 19:27:14 +0200 MIME-Version: 1.0 Content-Language: en-US X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" After upgrading to Core Update 157, a few number of users reported their systems to be unworkable after a reboot. Most of them (the systems, not the users) were apparently missing the new Linux kernel in their Grub configuration, causing a non-functional bootloader written to disk. While we seem to be able to rule out issues related to poor storage (SDDs, flash cards, etc.) or very high I/O load, it occurred to me we are not calling "sync" after having extracted a Core Update's .tar.gz file. This patch therefore proposes to do so. It is a somewhat homeopathic approach, though, but might ensure all parts of the system to have properly processed the contents of an extracted archive. While we cannot even reasonably guess it will solve the problem(s) mentioned initially, doing so cannot hurt either. See also: https://community.ipfire.org/t/after-update-ipfire-to-157-no-boot/5641/45 Signed-off-by: Peter Müller --- src/pakfire/lib/functions.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pakfire/lib/functions.sh b/src/pakfire/lib/functions.sh index 5918649db..d45572ce6 100644 --- a/src/pakfire/lib/functions.sh +++ b/src/pakfire/lib/functions.sh @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2012 IPFire Team # +# Copyright (C) 2007-2021 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -26,6 +26,7 @@ extract_files() { echo "Extracting files..." tar --acls --xattrs --xattrs-include='*' \ -xavf /opt/pakfire/tmp/files* --no-overwrite-dir -p --numeric-owner -C / + sync echo "...Finished." } @@ -33,6 +34,7 @@ extract_backup_includes() { echo "Extracting backup includes..." tar xavf /opt/pakfire/tmp/files* --no-overwrite-dir -p --numeric-owner -C / \ var/ipfire/backup/addons/includes + sync echo "...Finished." }