path: root/projectroot
diff options
authorRobert Schwebel <>2020-08-10 11:56:34 +0200
committerRobert Schwebel <>2020-08-10 17:30:30 +0200
commitb3893427b94d524d18fb8144eb89d766574d4920 (patch)
tree4fe6812237c948ecce211306f6b6b69928bf9441 /projectroot
parent86b84a60ff3629c325b0d65553530297bb53a953 (diff)
rc-once: make sure ssh key material is synced to disk
Without this sync, it might happen (and has been observed during tests) that ssh keys are generated, then the board is switched off, before the data made its way to the medium. This results in empty ssh keys, which makes the sshd service fail. Signed-off-by: Robert Schwebel <>
Diffstat (limited to 'projectroot')
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 e14936e..58e5c27 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 data makes it's way to the medium
+ sync
if ! mount_root_restore; then
# remounting rw/ro during the second boot will flush anything
# left in the filesystem journal