openrc-discuss

Re: Slow dependency calculation

Ed W

Tue Nov 10 20:02:50 2009

Roy Marples wrote:
You can replace the hwclock init script with the swclock init script which sets the local time to the time when the system was shutdown. This avoids the dependency recalc due to the invalid clock and you then run ntp to correctly set the time.


Hmm, seems we could potentially merge swclock and hwclock? Also I think the original bug poster overlooked that in his embedded situation he probably needs a cron job to regularly rewrite /etc/SHUTDOWNTIME in case the user simply unplugs the device rudely?

Perhaps the logic of the clock startup script could be re-ordered to something like:

- Set system clock using hwclock
- Check for /etc/LASTKNOWNTIME
- If it exists then choose the later of current systemtime and mtime of /etc/LASTKNOWNTIME

- At shutdown touch /etc/LASTKNOWNTIME

Does this get us anywhere...?  Basically we avoid time stepping backwards

Regards

Ed W

Follow-Ups:
Re: Slow dependency calculationRoy Marples
References:
Slow dependency calculationEd W
Re: Slow dependency calculationRoy Marples
Archive administrator: postmaster@marples.name