English Amiga Board


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: 1,146
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  
Old 20 March 2017, 21:20   #2
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
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
Banned
 
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
...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: 1,146
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
Banned
 
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
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: 1,146
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: 1,146
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
Banned
 
DamienD's Avatar
 
Join Date: Aug 2005
Location: London / Sydney
Age: 47
Posts: 20,420
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
Amiga1992
Registered User
 
Join Date: May 2001
Location: ?
Posts: 19,645
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.
Amiga1992 is offline  
Old 21 March 2017, 00:37   #10
Starglider 2
Registered User
 
Starglider 2's Avatar
 
Join Date: Jan 2014
Location: California
Posts: 1,146
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: 4,332
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: 1,146
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  
 


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 05:25.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.14206 seconds with 15 queries