[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how do you set your system clock from a remote time server?



On Sat, Apr 22, 2000 at 10:54, Maury Merkin wrote:
> I saw, just a few days ago, a post with a command to get the current
> time and reset the system clock.
> 
> I didn't pay much attention then 'cause I thought the script I used to
> use with RH would work.  They don't.  (No 'rdate' and no 'clock').

$ dpkg -S rdate
netstd: /usr/man/man8/rdate.8.gz
netstd: /usr/sbin/rdate

$ dpkg -S hwclock
sysvinit: /usr/doc/sysvinit/examples/hwclock.sh
util-linux: /sbin/hwclock
util-linux: /usr/man/man8/hwclock.8.gz
util-linux: /etc/init.d/hwclock.sh

$ cat /root/bin/setclock.sh
#!/bin/sh
/usr/sbin/rdate -s time.nist.gov
/sbin/hwclock --systohc

So, you need to have the netstd and util-linux packages installed, and
use hwclock (as of libc6) instead of clock. No worries!

Luck,
Pann
-- 
geek by nature, Linux by choice                     L I N U X       .~.
                                                    The Choice      /V\
http://www.ourmanpann.com/linux/                     of a GNU      /( )\
                                                    Generation     ^^-^^


Reply to: