But does it work??? ;-) I forgot to mention before to look at http://www.eecis.udel.edu/~mills/ntp/servers.htm for an explanation of how the time server strata works and for any special requirements when using any of the public time servers.
Ed At 03:21 PM Friday, 12/28/2001, you wrote -=> >On Friday 28 December 2001 11:01, you wrote: > > If you are connected to the internet all the time you can add a cron for > > rdate - > >I'm not always connected, so I wrote this little script: ><<<<>>>>>> >#!/bin/sh ># ># Name: settime.sh ># This script syncs the Linux time to that on a public ># NTP server ("Atomic Clock" just sounds better!) and ># then equalises software and hardware clocks. ># >#dependencies: rdate, Xdialog ># ># su to root first - rdate and hwclock need to run as root ># from a menu structure, call this script like this: "kdesu settime.sh" ># >u=`whoami` >r="root" >if [ "$u" != "$r" ] >then > a="You are logged on as "$u > a=$a". You must be root to run settime.sh" > echo $a | Xdialog --no-cancel --textbox "-" 0 0 & > exit 0 >fi > >Xdialog --screen-center --left --no-buttons --infobox "Preparing to sync >time/date\nto atomic clock server." 0 0 5000 & > >/usr/bin/rdate -s clock-1.cs.cmu.edu >sleep 1 >/sbin/hwclock --systohc > >Xdialog --screen-center --left --no-buttons --infobox "Time/date synced to >atomic clock\nThis dialog will self-destruct\nin 5 seconds .. 4 .. 3 .. 2 >.. 1" 0 0 6000 & > ><<<<>>>>>> > >NB: It doesn't do any error-checking besides looking for root status. If >rdate couldn't connect to the ntp server, the script will cheerfully >report success. Maybe in a later version ... Ed Kasky Los Angeles, CA . . . . . . . . "Faith is not belief without proof, but trust without reservations." - Elton Trueblood
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com