Traduisez - Übersetzen - Traduzca - Traduza - Tradurre - Translate

VanLUG Email Archive

VanLUG Mailing List
Re: rdate

New Message Reply About this list Date view Thread view Subject view Author view

Brian Edmonds (brian@gweep.bc.ca)
20 Oct 1998 10:20:12 -0700


inTEXT Communications <list@intextonline.com> writes:
> I like to use netdate ( A little old fashioned perhaps )

Same thing as rdate, AFAIK, just a different implementation. Some Linux
distributions appear to have one, some the other. Note that neither
sets the CMOS (hardware) clock as far as I can see, so you'll still need
to sync it with /sbin/clock.

Here's my script to do it with ntpdate. Just replace the ntpdate line
with a call to netdate or rdate, and take out the -u argument to clock
if your CMOS isn't in UTC. I also check for dhclient, as if it's up I'm
running xntpd which keeps the clocks continually synced.

#!/bin/sh
# synclock.hourly - synchronize hw and system clocks with the net

# only do this sync if dhclient has gone away
if [ -f /var/run/dhclient.pid ]; then
  exit 0
fi

/usr/local/bin/ntpdate -s -t 30 -u ntp1.cs.ubc.ca ntp.ubc.ca time.nrc.ca
/sbin/clock -uw

# EOF

Brian.


New Message Reply About this list Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b3 on Mon 02 Nov 1998 - 03:23:17 PST