summaryrefslogtreecommitdiffstats
path: root/projectroot
diff options
context:
space:
mode:
authorRobert Schwebel <r.schwebel@pengutronix.de>2020-08-10 12:17:13 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2020-08-14 14:24:52 +0200
commit96e952f118896288343003866c02384f09e7a28b (patch)
treeb46feccc39f7cfd6931345b30732e118d5085028 /projectroot
parentf99958dd69d6b8305f61c46413e4d25aee4e4d94 (diff)
downloadptxdist-96e952f118896288343003866c02384f09e7a28b.tar.gz
ptxdist-96e952f118896288343003866c02384f09e7a28b.tar.xz
rc-once: make sure data makes it to the medium
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> Message-Id: <20200810101713.247725-1-r.schwebel@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'projectroot')
-rw-r--r--projectroot/usr/lib/systemd/systemd-rc-once2
1 files changed, 2 insertions, 0 deletions
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