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

Re: setting time via network at boot



[D'oh - it's bad enough replying to the user instead of the list under
normal circumstances, but when replying to yourself ... :-) ]

Richard Hector wrote:
> 
> Hi all,
> 
> I've got an otherwise OK motherboard that has a dead realtime clock.
> 
> What I'd like to do is set the time from another machine at boot time.

Update:

I've modified /etc/init.d/hwclock.sh, basically replacing everything in
it. I set the time from a fixed host at boot using rdate, and do nothing
at stop. It seems to work OK - the sequence still seems strange to me;
something must calculate times backwards to write to the logs, because
I'm sure there are things being logged before this script runs, and they
have the right timestamp!

I'll do some tidying up (like, changing the name of the script!), but
basically it's working.

Oh - and for the first boot before I'd had a chance to install rdate, I
cheated and hard coded the time I guessed it was going to come up, using
date :-)

Next I'm planning to upgrade to woody - hopefully that doesn't screw
with my script :-)

Thanks to those who responded,

Richard



Reply to: