On 05/11/2011 22:19, Robert Simmons wrote:
> On Sat, Nov 5, 2011 at 6:03 PM, Alexander Best <arun...@freebsd.org> wrote:
>> same here. simply add something like the following to your crontab:
>>
>> 0       10      *       *       */2     /etc/rc.d/ntpdate onestart
> 
> I have something similar in my crontab which is not exactly what I
> need.  I want to make sure that the clock is set at every boot because
> I'm using this as a kerberos server.  If the clock is not set properly
> at boot, kerberos will not work properly until the nightly cron jobs
> are run and the clock is set then.  I need everything working at boot.
>  I can't have a window of problems between boot and midnight or
> whenever cron runs ntpdate.

crontabs have this handy '@reboot' syntax...  It's all explained in
crontab(5).

However, you would be well advised to run ntpd(8) rather than bodging
the clock with ntpdate at intervals.  ntpdate is deprecated by the ntp
project, given that ntpd now has the capability to synch the clock the
first time after restart no matter what the offset.  Just add these
rc.conf settings:

ntpd_enable="YES"
ntpd_sync_on_start="YES"

        Cheers,

        Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey     Ramsgate
JID: matt...@infracaninophile.co.uk               Kent, CT11 9PW

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to