Operating System - HP-UX
1826436 Members
4088 Online
109692 Solutions
New Discussion

Re: checkinstall scripts PATH set wrong

 
SOLVED
Go to solution
Jeff Sadowski_2
Frequent Advisor

checkinstall scripts PATH set wrong

OK after patching my system yesterday and forcing to ignore the checkinstall script for the main package I needed I decided to do more investigating as to what is going wrong
I put an echo into the script to find out what its PATH is set to
I added the line "echo path= $PATH"
and here is the output that gave
path= :/usr/sbin:/usr/lbin/sw
so it only appears to be looking in /usr/sbin for any real commands I think this is happening for all checkinstall scripts so I would like to fix this issue.
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: checkinstall scripts PATH set wrong

Shalom Jeff,

I'd look at /etc/profile or .profile because patching rarely if ever changes the location of files or the environment variables. More likely , this is a fault in the system environment.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Jeff Sadowski_2
Frequent Advisor

Re: checkinstall scripts PATH set wrong

seeing

UTILS="/usr/lbin/sw/control_utils"

...

. $UTILS

tells me to lookin

/usr/lbin/sw/control_utils
for the issue

looking at the line
PATH=${SW_PATH%:}:/usr/sbin:/usr/lbin/sw

I see no metion of ${SW_PATH%:}
this looks kind of strange with the %: in there
Jeff Sadowski_2
Frequent Advisor

Re: checkinstall scripts PATH set wrong

OK so it seems these scripts get environment variables from swinstall such as ${SW_PATH} and ${SW_ROOT} and such
so in order to test them on the commandline I need to set these variables.
Is there a way to see what variables that swinstall sets?
Dennis Handly
Acclaimed Contributor
Solution

Re: checkinstall scripts PATH set wrong

There is nothing to "fix". SD control scripts can't assume any paths exists other than what it supplies. You can use absolute paths if you know that path is mounted.

>so in order to test them on the commandline I need to set these variables. Is there a way to see what variables that swinstall sets?

Right, I've wanted to do that. Make sure you use sh and not ksh.
Well, you could use env(1) (/usr/bin/env) to list them all. But they are documented in Software Distributor Administration Guide:
http://docs.hp.com/en/oshpux11iv2.html#Installing%20and%20Updating
http://docs.hp.com/en/B2355-90979/ch11s04.html#d0e30149
Jeff Sadowski_2
Frequent Advisor

Re: checkinstall scripts PATH set wrong

The last response answered my question in full.