Re: [ARMini-support] !NetTime no longer resetting clock

  • From: Alan P Dawes <alan.dawes@xxxxxxxxxx>
  • To: ARMini-support list <armini-support@xxxxxxxxxxxxx>
  • Date: Wed, 08 Feb 2012 12:40:01 +0000 (GMT)

In article <8bcaed5d52.chris@xxxxxxxxxxxxxxxx>,
   Chris Hall <chris@xxxxxxxxxx> wrote:
> In message <525de8858dalan.dawes@xxxxxxxxxx>
>           Alan P Dawes <alan.dawes@xxxxxxxxxx> wrote:

SNIP

> > Unfortunately this has not worked for me as there is the error file
> > "NetTime_Kick not found" ie SetTime is running before !NetTime has
> > fully started and initialised the NetTime module.

> > I have my !Boot as supplied by the RComp Beagleboard Scheme. It has
> > !NetTime in $.Network.Utils folder and has it !Boot Configuration "Run
> > at startup" which has the lines:

> > $.!Boot.Choices.Boot.Desktop$.!Boot.Choices.Boot.DesktopIfThere
> > Boot:^.Network.Utils.!NetTime Then Filer_Boot
> > Boot:^.Network.Utils.!NetTime IfThere Boot:^.Network.Utils.!NetTime
> > Then Filer_Run Boot:^.Network.Utils.!NetTime

> > In $.!Boot.Choices.Boot.Desktop

> > Is this where your copy is?

> I have the following file otherwise as ARMini scheme (mostly):

> 'NetTime' in !Boot.Choices.Boot.Tasks:

But that is not where it is in the Armini scheme that I have. !NetTime
including the nettime module are in a separate $.Network.Utils folder and
the module is not in !System. !NetTime is run by the lines at the end of
the !Boot.Choices.Boot.Desktop file which are after the lines in that file
that run Tasks thus Settime is run before !NetTime so doesn't work for me.
In your tasks !NetTime is run before SetTime ("pling" ! before S) so it
works.

I don't really want to alter the ARMini scheme set up so I haven't moved
!NetTime to where you have put it. I did try putting *NetTime_Kick at the
end of the !NetTime.!Run file but that just locks up the module with a
Status: DNSwait and no amount of kicking will wake it up - to prevent this
there must be enough time for nettime to fetch the time from a net time
server before it is kicked.

My solution which has worked so far, is to put your SetTime in Tasks as
you have. Then to edit the $.!Boot.Choices.Boot.Desktop file, moving the
lines at the end of the file that run !NetTime to near the top of the file
before the lines
|Start RISC OS 0.00 0.72 Auto tasks
| See PreDesktop for details on !Start and !End
which runs Tasks. In that way !NetTime is run first and there is enough
time (as progs are run in Hook apps tasks and then Tasks) for it to find
and read the net time server before SetTime is run to kick it.

> | Nettime stuff
> Set NetTime$DST European
> Set Inet$TimeServer ntp.demon.co.uk
> Set Inet$NTPServer ntp.demon.co.uk
> Set NetTime$Server <Inet$TimeServer>
> RMEnsure NetTime 0.35 RMLoad System:Modules.Network.NetTime

The problem with that is that if you specify a single net time server like
demon's if there is anything wrong with it your time will not be reset.
The ARMini scheme !NetTime points to a pool of time servers so, when one
is down, time will be collected from one that is still working. There are
a number of "pools" the one in !NetTime is uk.pool.ntp.org

Alan

-- 
alan.dawes@xxxxxxxxxxxxx
alan.dawes@xxxxxxxxxx
Using an Acorn RiscPC
---
To alter your preferences or leave the group, 
visit //www.freelists.org/list/armini-support
List-related queries to support@xxxxxxxxxxxx

Other related posts: