Date: Fri, 23 Jun 1995 07:00:24 -0500 (CDT) From: Mike Pritchard <mpp@legarto.minn.net> To: bde@zeta.org.au (Bruce Evans) Cc: hackers@freebsd.org Subject: Re: Check the date and time at boot Message-ID: <199506231200.HAA00301@mpp.com> In-Reply-To: <199506230502.PAA25911@godzilla.zeta.org.au> from "Bruce Evans" at Jun 23, 95 03:02:32 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> >What I did was write a small program to check/record the system > >date in a file in the root file system. At boot time, the > > Use the timestamp in the super block of the root file system. > > Bruce I would rather not. What happens if I boot single user after some type of maintenance (likely after fiddling with CMOS settings) and mount the root file system rw and make changes? I've now updated the super-block timestamp, and anything in /etc/rc will never detect that the date may be be off when the system is booted multi-user. I've seen this exact same situation on another Unix system I used to manage that was checking the super-block time, and we re-did the program to use its own data file for just this reason. Plus, running the update program once an hour on its own data file lets it check that the clock has stayed sane since the last run. If the clock gets corrupted while the system is running, the super-block timestamp will now track this bogus time and thus be undetectable by /etc/rc. Also, do we support NFS mounted root file systems for diskless machines? If so, then this is another reason why the super-block timestamp couldn't be used. Re: Rod's comments As some other people have already pointed out, not everyone is connected to the net, or has a reliable enough connection to depend on ntpdate & friends to fix the time at boot time if it is in error. Even if you do have a good connection, network problems may prevent the time programs from correcting the date until long after the system has been up and running for a while. -- Mike Pritchard mpp@legarto.minn.net "Go that way. Really fast. If something gets in your way, turn"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199506231200.HAA00301>