cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
nosrednayduj
Level 7

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.)
Labels (1)
0 Kudos
(4) Replies
pv7721
Level 20

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.
0 Kudos
nosrednayduj
Level 7

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.
0 Kudos
pv7721
Level 20

Then it looks like to be a Solaris 9 bug to me (if it is happening only on this particular version)...
0 Kudos
nosrednayduj
Level 7

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.
0 Kudos