English Amiga Board


Go Back   English Amiga Board > Support > support.Apps

 
 
Thread Tools
Old 05 May 2016, 16:03   #1
manic23
Only Amiga!
 
manic23's Avatar
 
Join Date: Jan 2008
Location: London / UK
Age: 53
Posts: 512
Roadshow Shutdown Issue

I have finially got my WHDLoad-Cleanup script working the way it should thanks to Thomas in this thread!

The line I have in WHDLoad-Cleanup is AddNetInterface DEVS:NetInterfaces/~(#?.info) QUIET

This works just fine when I have my PCMCIA Network card inserted, games fire up and when I exit, Roadshow starts up and my cnet.device also works just fine. But sometimes I used My A1200 without the network card attached, and when I do I get this screen...



I don't want to have to keep editing the file when this happens. Is there a way I can make it so that that what my network card is not installed it will not bother me with this error?

I would have thought that having QUIET at the end would have done this but clearly not. I know it's not the biggest problem in the world to simply close the windows but I would like to get it working nicely, if only so I learn how to do it.

Last edited by manic23; 05 May 2016 at 16:56.
manic23 is offline  
Old 06 May 2016, 00:00   #2
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,334
Get http://aminet.net/package/util/cli/cardInfo
Make a script that says something like:
Code:
CardInfo -p <your card's ID>
If WARN
  QUIT
ELSE
  AddNetInterface DEVS:NetInterfaces/~(#?.info) QUIET
ENDIF
Use the script as your cleanup command.
idrougge is online now  
Old 06 May 2016, 09:51   #3
manic23
Only Amiga!
 
manic23's Avatar
 
Join Date: Jan 2008
Location: London / UK
Age: 53
Posts: 512
Roadshow Shutdown Issue

Thanks idrougge I will try that.

Edit: still getting:

The command you specified via execute cleanup had failed (returncode=10 doserror=0)

I have cardinfo in my C directory


Sent from my iPhone using Tapatalk

Last edited by manic23; 06 May 2016 at 10:50.
manic23 is offline  
Old 06 May 2016, 19:57   #4
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,334
What does it say if you run the script from a shell?
idrougge is online now  
Old 07 May 2016, 09:51   #5
manic23
Only Amiga!
 
manic23's Avatar
 
Join Date: Jan 2008
Location: London / UK
Age: 53
Posts: 512
It says...

PCMCIA card owned by: compactflash.device
ERROR: Unable to claim card

I am typing, cardinfo -p compactflash.device I have also tried the volume name and CF0


Sent from my iPhone using Tapatalk
manic23 is offline  
Old 07 May 2016, 11:10   #6
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,334
The thing after -p should be an identifier string for your card. Check the documentation for CardInfo.

Also, check what
Code:
echo $RC
says after running the script in a shell.
idrougge is online now  
Old 07 May 2016, 20:03   #7
manic23
Only Amiga!
 
manic23's Avatar
 
Join Date: Jan 2008
Location: London / UK
Age: 53
Posts: 512
I restarted with no Workbench running just the command line and was able to run cardinfo like that. My card ID is 1050, I tried running the command again, cardinfo -p 1050 but still get the error.

I tried running ehco $RC but nothing happened, no result.

Thanks for all your help idrougge, really apreciate it, but I'll just live with the error, it;'s not really a major issue and I dont want to take up any more of your time.
manic23 is offline  
Old 07 May 2016, 20:16   #8
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,334
Try to switch "if WARN" to "if ERROR".
idrougge is online now  
Old 07 May 2016, 21:03   #9
manic23
Only Amiga!
 
manic23's Avatar
 
Join Date: Jan 2008
Location: London / UK
Age: 53
Posts: 512
Ok I'll give it a go thanks again


Sent from my iPad using Tapatalk
manic23 is offline  
Old 08 May 2016, 03:25   #10
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,334
Alternatively, if that doesn't work, try this:
Code:
Assign EXISTS CFD: (or whatever your compact flash device is called)
If NOT WARN
  QUIT
ELSE
  AddNetInterface DEVS:NetInterfaces/~(#?.info) QUIET
ENDIF
idrougge is online now  
Old 08 May 2016, 10:14   #11
manic23
Only Amiga!
 
manic23's Avatar
 
Join Date: Jan 2008
Location: London / UK
Age: 53
Posts: 512
Thanks that 2nd suggestion worked fine when the cf card if inserted, I get no error message when exiting a game. But when the network card is inserted it does not restart the tcp ip stack when exiting lol


Sent from my iPhone using Tapatalk
manic23 is offline  
Old 08 May 2016, 13:17   #12
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,334
Try changing the CFD: to the volume name of your CF card.
idrougge is online now  
Old 08 May 2016, 15:22   #13
manic23
Only Amiga!
 
manic23's Avatar
 
Join Date: Jan 2008
Location: London / UK
Age: 53
Posts: 512
Quote:
Originally Posted by idrougge View Post
Try changing the CFD: to the volume name of your CF card.
SUCCESS!!!!

Thank you so much for your efforts idrougge, that worked! Now when I have the CF card in I can play games without the annoying error when quitting and when I have the network card in everything works as expected, my network card starts up no problem.

You are a genius!

Just in case anyone comes across this thread and finds it useful, below is the script that works. Easier to post here rather than wading through all the above posts. This script assumes that you have a CF card named AmigaCF, obviously change this to whatever your CF is called...

Code:
Assign EXISTS AmigaCF:
If NOT WARN
 QUIT
ELSE
 AddNetInterface DEVS:NetInterfaces/~(#?.info) QUIET
ENDIF

Last edited by manic23; 08 May 2016 at 15:42.
manic23 is offline  
Old 08 May 2016, 16:32   #14
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,334
It's still not the ideal solution because it fails if you insert a card with another name or your PCMCIA slot is empty.

The problem is that CardInfo can't be run if the PCMCIA port is in use by cfd.device.

The case if the slot is empty can still be handled by CardInfo, making the script a bit more resilient:
Code:
Assign EXISTS AmigaCF:
If NOT WARN
 QUIT
ENDIF
CardInfo -p <your network card's ID>
IF WARN
 QUIT
ELSE
 AddNetInterface DEVS:NetInterfaces/~(#?.info) QUIET
ENDIF
What's necessary for a fool-proof cleanup script is a way to check if the cfd.device is in use.

Last edited by idrougge; 08 May 2016 at 16:59.
idrougge is online now  
Old 08 May 2016, 16:42   #15
manic23
Only Amiga!
 
manic23's Avatar
 
Join Date: Jan 2008
Location: London / UK
Age: 53
Posts: 512
OK, thanks for that I will give it a go. I must admit I had not though about if the PCMCIA slot is empty! It's not really an issue for me about difference CF names, as I only use one card at the moment, but even if I end up using more, I can just give them all the same name!!

Last edited by manic23; 08 May 2016 at 16:50.
manic23 is offline  
Old 08 May 2016, 17:12   #16
manic23
Only Amiga!
 
manic23's Avatar
 
Join Date: Jan 2008
Location: London / UK
Age: 53
Posts: 512
Hmm, can't seem to get that one working, get the old failed at return code error again.
manic23 is offline  
Old 08 May 2016, 17:21   #17
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,334
I'm not on an A1200 right now (and usually am not), but it seems that CardInfo reports WARN if the card is not found but ERROR if the card.resource can't be opened (because it's in use by cfd.device). So this might work for all occasions:
Code:
CardInfo -p <your network card's ID> >NIL:
IF 0
 AddNetInterface DEVS:NetInterfaces/~(#?.info) QUIET
ELSE
 QUIT
ENDIF
idrougge is online now  
Old 08 May 2016, 17:29   #18
manic23
Only Amiga!
 
manic23's Avatar
 
Join Date: Jan 2008
Location: London / UK
Age: 53
Posts: 512
Sorry do you mean to add that to to the after the first ENDIF or is that the full script now?
manic23 is offline  
Old 08 May 2016, 17:52   #19
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,334
That's the full script. No warranty.
idrougge is online now  
Old 08 May 2016, 17:53   #20
manic23
Only Amiga!
 
manic23's Avatar
 
Join Date: Jan 2008
Location: London / UK
Age: 53
Posts: 512
Lol ok thanks still not working but don't worry I rarely have no card inserted anyway so I'll live with what you have me thanks again


Sent from my iPhone using Tapatalk
manic23 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
Roadshow 68K - Needs your support! mech Amiga scene 90 16 September 2015 01:01
Shutdown Sim085 support.Other 2 26 March 2015 00:29
Virus that stays in memory even after shutdown cosmiq Coders. General 54 01 March 2014 17:27
Roadshow Update released AndreasM News 0 11 November 2013 14:44
Trying to run RoadShow Retrofan support.Apps 10 10 May 2013 21:00

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 23:44.

Top

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