Operating System - HP-UX
1823113 Members
3370 Online
109646 Solutions
New Discussion юеВ

Re: swinstall - passing variables to control scripts

 
Mike McDevitt
New Member

swinstall - passing variables to control scripts

I have an in-house application for which I'm creating a depot. There are pre-defined internal variables usable by the control scripts. How can I store a variable that stays with the package for use within the config or checkinstall scripts?
4 REPLIES 4
Caesar_3
Esteemed Contributor

Re: swinstall - passing variables to control scripts

Hello!

Generate dinamicly your sw scripts with
the wanted variables.
Or your sw scripts can read some config
file which will have the variables.

Caesar
Sridhar Bhaskarla
Honored Contributor

Re: swinstall - passing variables to control scripts

Hi Mike,

I am not sure if I understood your question correctly.

You will need to source-in /usr/lbin/sw/contril_utils in your swpackage scripts. Along with the internal variables, there are quite a few functions available with this script that can ease your tasks. Look at the file and the documentation is in there.

If you are talking about your own variables, then create one file that defines common variables. Dot-in the file in each of your swpackage script. This way there is only one file you need to modify to change the variables.

-Sri

You may be disappointed if you fail, but you are doomed if you don't try
vasundhara
Frequent Advisor

Re: swinstall - passing variables to control scripts

Hi,

If the number of variables are less, you can even try with ENVIRONMENT VARIABLEs. You can use that variable in your script and in the term you start swinstall, don't forget to set the values. Its only an blind idea. may be so perfect and I have not tried it also.

Regards
VJ.
Mike McDevitt
New Member

Re: swinstall - passing variables to control scripts

These all sound viable but what I'm looking to do is create a psf file with an additional variable with a directory and within a checkinstall script, check the existance of that directory prior to installing or re-installing. I need to keep this with the package for the future.