[oe] [PATCH v2] initscripts: Modify 'populate-volatile.sh' to atomically update 'volatile.cache'

Paul Menzel paulepanter at users.sourceforge.net
Thu Jun 9 20:28:15 UTC 2011


Dear James,


Am Mittwoch, den 08.06.2011, 01:19 +0000 schrieb James Limbouris:
> > Date: Tue, 07 Jun 2011 12:13:14 +0200
> > From: Paul Menzel <paulepanter at users.sourceforge.net>

[…]

> > Am Dienstag, den 07.06.2011, 17:35 +0800 schrieb James Limbouris:
> > > When power is lost before a new volatile.cache has been flushed to disk,
> > > it can be corrupted, leaving the volatiles uncreated and causing software
> > failure.
> > 
> > So the device is still booting up although the power is lost? I am still
> > confused how this patch can fix this. I am sorry for my ignorance.

> The problem is that the volatile.cache script becomes corrupt.
> On my system it became empty after power loss. When the system
> reboots, it runs the empty script instead of recreating the volatiles, and
> so some of the /var/xxx directories become broken symlinks. System software
> then refuses to start up. If we make sure that it is never corrupted, the
> problem should go away.

thank you again for the clarification. I was confused not knowing how
`populate-volatile.sh` worked. It just checks for the existence of
`volatile.cache` and not the build file. I thought the build file would
be used then too.

I committed your patch [1]. Please update the state in the patch queue
[2].

One more question. Is `rm -rf volatile.cache` actually a noop since it
does not exist due to the prior check?


Thanks,

Paul


[1] http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=9a799fb3464b61df51f5e772c693cd76ad948f28
[2] http://openembedded.org/index.php/Patchwork
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20110609/c247685d/attachment-0002.sig>


More information about the Openembedded-devel mailing list