On Fri, Apr 08, 2016 at 06:49:35PM +0100, Steve McIntyre wrote:
> The problem is that I don't think there's a good solution to both
> problems here. We can't *know* that the system time has been read from
> fake-hwclock.data before calling "save". I briefly considered adding a
> "I've seen this" flag that could be set in "load", but that's no
> guarantee at all - if we power down unexpectedly then it'll be set
> already at next boot.

Could you leave something in /run that notes that load has been called?
Or is /run not available at the right time for that?

> What we *can* do is instead add an extra declaration of system time
> based on the build/release date of the particular version of the
> fake-hwclock package in use, and refuse to back to a date before
> *that* unless --force is used. How does that sound?

That would work for my use case, I think. Since in my failure case the
time ends up right back near the epoch and nowhere near the present
time.

Robie

Reply via email to