Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Jun 1995 10:20:43 -0700 (PDT)
From:      "Rodney W. Grimes" <rgrimes@gndrsh.aac.dev.com>
To:        mpp@legarto.minn.net (Mike Pritchard)
Cc:        bde@zeta.org.au, hackers@freebsd.org
Subject:   Re: Check the date and time at boot
Message-ID:  <199506231720.KAA10860@gndrsh.aac.dev.com>
In-Reply-To: <199506231200.HAA00301@mpp.com> from "Mike Pritchard" at Jun 23, 95 07:00:24 am

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.

Won't this cron job get just as confused since it is scheduled by cron
who uses the system time for scheduling jobs.  If I recall correctly
cron does some really strange things when the system time is changed
radically with respect to scheduling jobs.
 
> 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.

Now that is a good point!   But diskless clients should ask the
server for the time IMHO anyway.  If you running diskless machines
there is not really an argument that you don't have good network
connections.  (At least between the server and the client, make the
server the master time keeper for the site).

> 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.

I have already responded on that point.


-- 
Rod Grimes                                      rgrimes@gndrsh.aac.dev.com
Accurate Automation Company                 Reliable computers for FreeBSD



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199506231720.KAA10860>