From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: In-Reply-To: <20200810101713.247725-1-r.schwebel@pengutronix.de> MIME-Version: 1.0 Message-Id: From: Michael Olbrich Date: Mon, 17 Aug 2020 08:18:24 +0200 Subject: Re: [ptxdist] [APPLIED] rc-once: make sure data makes it to the medium List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ptxdist-bounces@pengutronix.de Sender: "ptxdist" To: ptxdist@pengutronix.de Cc: Robert Schwebel Thanks, applied as 96e952f118896288343003866c02384f09e7a28b. Michael [sent from post-receive hook] On Mon, 17 Aug 2020 08:18:24 +0200, Robert Schwebel wrote: > 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 > Message-Id: <20200810101713.247725-1-r.schwebel@pengutronix.de> > Signed-off-by: Michael Olbrich > > diff --git a/projectroot/usr/lib/systemd/systemd-rc-once b/projectroot/usr/lib/systemd/systemd-rc-once > index e14936e40b03..db3d84e3c342 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 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de