Operating System - HP-UX
1830936 Members
2007 Online
110017 Solutions
New Discussion

How do I get SW_LOCATION environment variable value to be picked up by swinstall

 
Ciaran McGovern
New Member

How do I get SW_LOCATION environment variable value to be picked up by swinstall

Hi,

I want to create a package which can be installed to any user defined directory.



I have modified my .psf file in the following way:

in the product section:

is_locatable true
directory /

Then within each fileset, I have defined the destination of files and directories to be relative to the value of $SW_LOCATION. i.e.:

an entry might look like:

directory ./image/perl/lib/B=/perl/lib/B

Therefore, I want the value of $SW_LOCATION to be prepended to the destination value.

I have also modified my preinstall and postinstall scripts.

They check to see if $SW_LOCATION is set, and if it is, then no action is taken.

otherwise, $SW_LOCATION is set to a default value.

I create the package successfully and then set $SW_LOCATION to my desired value.

I run swinstall, but my files keeep on been put under the root '/' directory.

Can anybody help?

This is quite urgent and I'd really appreciate some help.

Alternatively, can you suggest other places I can ask for help?

Many thanks,

Tim Culhane
1 REPLY 1
Andy Monks
Honored Contributor

Re: How do I get SW_LOCATION environment variable value to be picked up by swinstall

Haven't done this for a while, but to me, it looks like your directory statement is wrong :-

directory ./image/perl/lib/B=/perl/lib/B

Your specifying an absolute path. Try :-

directory ./image/perl/lib/B=.