diff options
author | Robert Schwebel <r.schwebel@pengutronix.de> | 2020-08-10 11:56:34 +0200 |
---|---|---|
committer | Robert Schwebel <r.schwebel@pengutronix.de> | 2020-08-10 17:30:30 +0200 |
commit | b3893427b94d524d18fb8144eb89d766574d4920 (patch) | |
tree | 4fe6812237c948ecce211306f6b6b69928bf9441 /projectroot/usr | |
parent | 86b84a60ff3629c325b0d65553530297bb53a953 (diff) | |
download | DistroKit-b3893427b94d524d18fb8144eb89d766574d4920.tar.gz DistroKit-b3893427b94d524d18fb8144eb89d766574d4920.tar.xz |
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 <r.schwebel@pengutronix.de>
Diffstat (limited to 'projectroot/usr')
-rw-r--r-- | projectroot/usr/lib/systemd/systemd-rc-once | 2 |
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 |