So because the platform I'm developing a Java application for is Solaris, I need to be able to run a mount CD or USB script which is provided to me. The script will return a status code...so first question is, where do I start looking at to execute and get the status code of the script? Second question is, if the status code is 0 (as in failure), the script will echo out some sort of meaningful error message. I would like to capture that and be able to display it in a error dialog...how would I go about capturing that. Also (probably a little bit outside of this forum, but I'll give it a shot)...does the script run in a separate shell? Like if I have System.outs in my main program, and then run the script, will I have an issue capturing the echo outputs from the script? Thanks!
Here's the actual script (sorry, it's a bit long...but I'm not knowledgable enough with shell scripting to know what parts are important).
What puzzles me is that there does not seem to be any status or exit if the mount of the CD is successful or not which leads me to believe that there needs to be some work done on the script. Nevertheless, if someone can decipher this stuff and help me out, it would be greatly appreciated.