Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Jun 1995 17:55:06 -0700 (PDT)
From:      "Rodney W. Grimes" <rgrimes@gndrsh.aac.dev.com>
To:        mpp@legarto.minn.net (Mike Pritchard)
Cc:        hackers@freebsd.org
Subject:   Re: Check the date and time at boot
Message-ID:  <199506230055.RAA09076@gndrsh.aac.dev.com>
In-Reply-To: <199506230028.TAA00290@mpp.com> from "Mike Pritchard" at Jun 22, 95 07:28:14 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> Is there any interest in some /etc/rc changes (along with a small
> helper program) to check if the system date and time may be
> wrong?  I did this after having my system clock wacked a couple
> of times, and didn't notice it for a day or so, and thought that it 
> would be a good thing to have in the system by default
> 
> 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
> program checks if the time in the file and the current time
> differ by more than 24 hours (the time period is user selectable).  
> If it is, then /etc/rc will inform you of this, and give
> you the option to fix it by running /bin/sh (or "su root" if your
> console isn't secure).  I could also add a sysconfig option
> to make it not stop and ask if you want to change the date for 
> machines that reside in unattended areas.
> 
> Once an hour cron runs the program to update the date file,
> and will also issue a log message if the current time appears
> to be off.
> 
> If there is interest, I'll gather everything up and submit
> them.

The more correct way to fix this is to use either ntpdate or timed
at boot time.  Both are already supported by /etc/rc and /etc/sysconfig,
I don't think we need yet a third way to get the date right during boot.


-- 
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?199506230055.RAA09076>