This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallAnywhere
- :
- InstallAnywhere Forum
- :
- solaris script problem: limit descriptors
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 30, 2008
01:45 PM
solaris script problem: limit descriptors
My installer launches a script during post-install. On unix, this is a csh script which contains the line:
limit -h descriptors 4096
We require root to do the install on unix.
So this works, EXCEPT on my Solaris 9 test machine. I have a couple other machines running Solaris 8, which are fine. And several linux machines, which are also fine.
If I launch my script directly from the shell, all is copacetic. However, if I launch my script from within InstallAnywhere, the script dies at the "limit" with the error: "limit: descriptors: Can't set hard limit". It seems not to matter if I use "Execute script/batch file" or "Execute Command", or if I use "csh -c myscriptname" vs just "myscriptname".
Does IA mess with the effective ID on solaris? Does just Solaris 9 obey whatever it does? (I don't have a solaris 10 machine to try.) How would I find out the effective ID from within my script or within IA? (I'm not prepared to figure out how to run JNI code from IA just for this test just so I could call geteuid, so I mean, other than that. I thought about the supplied ExecuteAsRoot, but geez, I'm going to have to package up expect and tcl to install TOO. That does not look easy! But maybe I have to.)
limit -h descriptors 4096
We require root to do the install on unix.
So this works, EXCEPT on my Solaris 9 test machine. I have a couple other machines running Solaris 8, which are fine. And several linux machines, which are also fine.
If I launch my script directly from the shell, all is copacetic. However, if I launch my script from within InstallAnywhere, the script dies at the "limit" with the error: "limit: descriptors: Can't set hard limit". It seems not to matter if I use "Execute script/batch file" or "Execute Command", or if I use "csh -c myscriptname" vs just "myscriptname".
Does IA mess with the effective ID on solaris? Does just Solaris 9 obey whatever it does? (I don't have a solaris 10 machine to try.) How would I find out the effective ID from within my script or within IA? (I'm not prepared to figure out how to run JNI code from IA just for this test just so I could call geteuid, so I mean, other than that. I thought about the supplied ExecuteAsRoot, but geez, I'm going to have to package up expect and tcl to install TOO. That does not look easy! But maybe I have to.)
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 03, 2009
10:37 AM
On this page: http://www.acresso.com/downloads/downloads_7399.htm you can download the ExecuteAsRoot Custom Code allowing to run your command as root.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 03, 2009
06:20 PM
I saw ExecuteAsRoot, but it requires the 3rd party software Expect to be installed on the target machine and that did not seem like it was a feasible solution. Also, I ought to ALREADY be root, as I am requiring the user to be root in order to launch my installer (with a custom rule). I just want that root-ness to be transferred down to my script -- which it is on other unix systems! Just not Solaris 9.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 05, 2009
05:26 AM
Then it looks like to be a Solaris 9 bug to me (if it is happening only on this particular version)...
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 05, 2009
01:24 PM
I got access to a solaris 10 machine, and it behaves identically. So maybe it's some "new security feature" and the "bug" is that Solaris 8 (and linux) allow me to use "limit -h descriptors" within such a script. I'm using a workaround in the script so that if the limit is already larger than 4096 I don't try to set it. Since Sol 9 and 10 default to 65536.