mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] rc-once: make sure data makes it to the medium
@ 2020-08-10 10:17 Robert Schwebel
  2020-08-10 13:46 ` Uwe Kleine-König
  2020-08-17  6:18 ` [ptxdist] [APPLIED] " Michael Olbrich
  0 siblings, 2 replies; 6+ messages in thread
From: Robert Schwebel @ 2020-08-10 10:17 UTC (permalink / raw)
  To: ptxdist; +Cc: Robert Schwebel

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-08-17  6:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-10 10:17 [ptxdist] [PATCH] rc-once: make sure data makes it to the medium Robert Schwebel
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox