mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Robert Schwebel <r.schwebel@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Robert Schwebel <r.schwebel@pengutronix.de>
Subject: [ptxdist] [PATCH] rc-once: make sure data makes it to the medium
Date: Mon, 10 Aug 2020 12:17:13 +0200	[thread overview]
Message-ID: <20200810101713.247725-1-r.schwebel@pengutronix.de> (raw)

We have seen that, if the first boot runs under a testsuite that powers
the board off after rc-once is finished, data hasn't found its way to
the medium. This has been observed to result in an empty ssh key.

Adding a sync helps.

Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de>
---
 projectroot/usr/lib/systemd/systemd-rc-once | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/projectroot/usr/lib/systemd/systemd-rc-once b/projectroot/usr/lib/systemd/systemd-rc-once
index e14936e40..db3d84e3c 100644
--- a/projectroot/usr/lib/systemd/systemd-rc-once
+++ b/projectroot/usr/lib/systemd/systemd-rc-once
@@ -21,6 +21,8 @@ start() {
 }
 
 umount() {
+	# make sure rc-once generated data makes it to the medium
+	sync
 	if ! mount_root_restore; then
 		# remounting rw/ro during the second boot will flush anything
 		# left in the filesystem journal
-- 
2.27.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

             reply	other threads:[~2020-08-10 10:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-10 10:17 Robert Schwebel [this message]
2020-08-10 13:46 ` Uwe Kleine-König
2020-08-10 13:59   ` Robert Schwebel
2020-08-10 16:03     ` Bruno Thomsen
2020-08-11 10:24       ` Ladislav Michl
2020-08-17  6:18 ` [ptxdist] [APPLIED] " Michael Olbrich

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=20200810101713.247725-1-r.schwebel@pengutronix.de \
    --to=r.schwebel@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /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