English Amiga Board Amiga Lore


Go Back   English Amiga Board > Support > support.Other

 
 
Thread Tools
Old 20 March 2017, 20:45   #1
Starglider 2
Registered User

Starglider 2's Avatar
 
Join Date: Jan 2014
Location: California
Posts: 759
Adding a timeout to a user-startup command?

My A500 has Wi-Fi, but the Wi-Fi bridge is on the same power strip as the Amiga, so the first time I boot the whole system, the bridge is still handshaking with my router when my user-startup calls:

Code:
ntpsync_68k -c us.pool.ntp.org
This pulls the time from the atomic clock and forgoes the need for a battery backup clock.

I can live without this on my first boot of the day, so when user-startup hangs there, I hit Ctrl-C and am in Workbench in no time (pardon the pun). Curiously the time seems to have set, but it didn't return a completion message in time (pardon the pun).

So what I want to do is add a timeout (pardon the pun) to that line of user-startup. Is this possible and if so what is the code?

Thanks!!
Starglider 2 is offline  
AdSense AdSense  
Old 20 March 2017, 21:20   #2
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 3,776
you can try to "runback" ntpsync using AsyncRun_1.8 .
from the description it will completely detache, so you will get your workbench in no time

Last edited by emufan; 20 March 2017 at 21:27.
emufan is offline  
Old 20 March 2017, 21:39   #3
DamienD
Global Moderator

DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 40
Posts: 9,252
...or can you use the Wait command if you know roughly how it takes before everything is ready?
DamienD is offline  
Old 20 March 2017, 22:53   #4
Starglider 2
Registered User

Starglider 2's Avatar
 
Join Date: Jan 2014
Location: California
Posts: 759
Quote:
Originally Posted by DamienD View Post
...or can you use the Wait command if you know roughly how it takes before everything is ready?
So in my instance, how would I set that up?

Thanks!!
Starglider 2 is offline  
Old 20 March 2017, 23:17   #5
DamienD
Global Moderator

DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 40
Posts: 9,252
Quote:
Originally Posted by Starglider 2 View Post
So in my instance, how would I set that up?
Thanks!!
I only quickly read your thread so hopefully I've understood what it is that you want to achieve / require...

You have this in your "User-Startup" file in relation to setting up the Wi-Fi connection:

Code:
ntpsync_68k -c us.pool.ntp.org
...but you want to wait a period of time before Workbench loads, ideally after the above has completed. Is that correct?

You could then add the Wait command after the above for whatever period is required before Workbench is loaded / ready to use.

Perhaps you could even display something like:
Code:
  
Echo Waiting x seconds (or minutes) for blah, blah, blah to initialise... 
Wait SECS x (or Wait MINS x)
I'm sure the Amiga gurus around here could tell you a better way; it was just a quick thought on my part
DamienD is offline  
Old 20 March 2017, 23:25   #6
Starglider 2
Registered User

Starglider 2's Avatar
 
Join Date: Jan 2014
Location: California
Posts: 759
Quote:
Originally Posted by DamienD View Post
I only quickly read your thread so hopefully I've understood what it is that you want to achieve / require...

You have this in your "User-Startup" file in relation to setting up the Wi-Fi connection:

Code:
ntpsync_68k -c us.pool.ntp.org
...but you want to wait a period of time before Workbench loads, ideally after the above has completed. Is that correct?

You could then add the Wait command after the above for whatever period is required before Workbench is loaded / ready to use.

Perhaps you could even display something like:
Code:
  
Echo Waiting x seconds (or minutes) for blah, blah, blah to initialise... 
Wait SECS x (or Wait MINS x)
I'm sure the Amiga gurus around here could tell you a better way; it was just a quick thought on my part
No, I want the command to cancel/timeout/give up after 10 seconds. I don't want to wait till it has finished.

Thanks!!
Starglider 2 is offline  
Old 20 March 2017, 23:25   #7
Starglider 2
Registered User

Starglider 2's Avatar
 
Join Date: Jan 2014
Location: California
Posts: 759
Quote:
Originally Posted by emufan View Post
you can try to "runback" ntpsync using AsyncRun_1.8 .
from the description it will completely detache, so you will get your workbench in no time
Thanks. If that's my only option I'll give it a whirl.

Thanks!!
Starglider 2 is offline  
Old 20 March 2017, 23:47   #8
DamienD
Global Moderator

DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 40
Posts: 9,252
Quote:
Originally Posted by Starglider 2 View Post
No, I want the command to cancel/timeout/give up after 10 seconds. I don't want to wait till it has finished.

Thanks!!
Ah, gotcha... then obviously ignore what I've written then
DamienD is offline  
Old 21 March 2017, 00:14   #9
Akira
Registered User

Akira's Avatar
 
Join Date: May 2001
Location: New York
Posts: 17,921
Can't you just Run >NIL: it to be detached from the startup-sequence? Then it'll do its business while Workbench continues to load.
Akira is offline  
Old 21 March 2017, 00:37   #10
Starglider 2
Registered User

Starglider 2's Avatar
 
Join Date: Jan 2014
Location: California
Posts: 759
Quote:
Originally Posted by Akira View Post
Can't you just Run >NIL: it to be detached from the startup-sequence? Then it'll do its business while Workbench continues to load.
NIL has always been a bit of a mystery to me. Thanks!

What would be the full command?

Thanks!!
Starglider 2 is offline  
Old 21 March 2017, 01:31   #11
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 3,020
Run >NIL: ntpsync_68k -c us.pool.ntp.org
idrougge is offline  
Old 21 March 2017, 01:36   #12
Starglider 2
Registered User

Starglider 2's Avatar
 
Join Date: Jan 2014
Location: California
Posts: 759
Quote:
Originally Posted by idrougge View Post
Run >NIL: ntpsync_68k -c us.pool.ntp.org
Thanks! Seems to do the trick!
Starglider 2 is offline  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
ask like command with timeout (and default option) Vot Coders. Scripting 3 27 May 2013 18:00
Workbench Version command and startup-sequence Ze Emulatron support.Other 3 27 June 2011 16:19
Server timeout issue andreas project.EAB 11 23 June 2011 04:49
a box in winuae gui for adding user notes wud be ace kirk request.UAE Wishlist 7 24 April 2009 11:27
AmiTCP startnet in user-startup rlake support.Apps 3 16 February 2004 05:33

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:27.


Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Page generated in 0.19498 seconds with 13 queries