From b3893427b94d524d18fb8144eb89d766574d4920 Mon Sep 17 00:00:00 2001 From: Robert Schwebel Date: Mon, 10 Aug 2020 11:56:34 +0200 Subject: 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 --- projectroot/usr/lib/systemd/systemd-rc-once | 2 ++ 1 file changed, 2 insertions(+) (limited to 'projectroot') 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 -- cgit v1.2.3