From: "Peter Müller" <peter.mueller@ipfire.org>
To: development@lists.ipfire.org
Subject: [PATCH] Pakfire: call "sync" in function.sh after having extracted archives
Date: Wed, 07 Jul 2021 19:27:14 +0200 [thread overview]
Message-ID: <472c333c-89ca-97df-9863-683d28d0b7c4@ipfire.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 2412 bytes --]
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 <peter.mueller(a)ipfire.org>
---
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 <info(a)ipfire.org> #
+# Copyright (C) 2007-2021 IPFire Team <info(a)ipfire.org> #
# #
# 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."
}
--
2.26.2
reply other threads:[~2021-07-07 17:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=472c333c-89ca-97df-9863-683d28d0b7c4@ipfire.org \
--to=peter.mueller@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