[plug] Time server

Quintin Lette quintin at arach.net.au
Thu Feb 20 18:07:47 WST 2003


Any advise on what stage in bootup (ie what file) i should add a request to 
update my clock?

I have written a VERY basic script to update it, but I can't think of the best 
place to put it in bootup.  The script is currently run in cron daily, but my 
pc is losing a few hours every reboot and replacing the CMOS battery is just 
too easy and won't fix the problem :)

<script>

#!/bin/sh
/usr/sbin/ntpdate ntp.debian.localdomain
hwclock --systohc

</script>

(I have setup a timeserver on a pc within my network which has a similar 
script except using my isp's timeserver and another time server for backup 
and has been saved as /etc/cron.daily/timeupdate)

This obviously has no fault tolerance :( if it doesn't get the correct time it 
will just save the incorrect time in the cmos but that doesn't really worry 
me atm, I would just like to know where to put it in bootup sequence (ie 
which file)

If there is a better way to do this (I'm sure there are millions) please feel 
free to share them.

Thanks
Quintin
 




More information about the plug mailing list