From owner-freebsd-hackers Thu Jun 22 17:55:03 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id RAA09170 for hackers-outgoing; Thu, 22 Jun 1995 17:55:03 -0700 Received: from gndrsh.aac.dev.com (gndrsh.aac.dev.com [198.145.92.241]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id RAA09163 for ; Thu, 22 Jun 1995 17:55:00 -0700 Received: (from rgrimes@localhost) by gndrsh.aac.dev.com (8.6.11/8.6.9) id RAA09076; Thu, 22 Jun 1995 17:55:06 -0700 From: "Rodney W. Grimes" Message-Id: <199506230055.RAA09076@gndrsh.aac.dev.com> Subject: Re: Check the date and time at boot To: mpp@legarto.minn.net (Mike Pritchard) Date: Thu, 22 Jun 1995 17:55:06 -0700 (PDT) Cc: hackers@freebsd.org In-Reply-To: <199506230028.TAA00290@mpp.com> from "Mike Pritchard" at Jun 22, 95 07:28:14 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1473 Sender: hackers-owner@freebsd.org Precedence: bulk > > 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