Operating System - HP-UX
1748181 Members
3733 Online
108759 Solutions
New Discussion

Postinstall script failing during swinstall, exit code 1

 
ColinMA_42
Occasional Advisor

Postinstall script failing during swinstall, exit code 1

Hello,

I've been handed the keys to some old legacy systems running HPUX 11.11.  I've been attempting to bring them all up to the same patch level, so I can get Ignite running.  These are old systems we're trying to get away from, but it'll take time.  In that time, we've had HDD's die and restoring them without an Ignite backup is a horror show.

Anyway, I'm using 'sam' to get into the Software Install, pointing it to the correct directory and after doing it's verification steps, it starts the install, only to get the same error over multiple packages:

ERROR:  The "postinstall" script for "PHKL_30310" failed (exit code "1").  The script location was:...

This happens repeatedly.  I'm logged in as root, but when I look at the contents of the location, I see all the files are -rw-rw-r--, including the postinstall script.  No executable bit is set for 'other'.  If I chmod the files to be executable by 'other', or chown root:sys and set the user bit executable, it continues on.  But it keeps happening!  Every package does this.  

srs057:/var/tmp/BAAa29924/catalog/PHKL_30310/pfiles# ls -la
total 96
drwxr-xr-x 2 root sys 96 Jun 19 14:04 .
drwxr-xr-x 6 root sys 96 Jun 19 14:04 ..
-rw-rw-r-- 1 1000 1000 1106 Jun 19 14:04 INDEX
-rw-rw-r-- 1 1000 1000 471 Jun 19 14:04 INFO
-rw-rw-r-- 1 1000 1000 11643 Jun 19 14:04 README
-rw-rw-r-- 1 1000 1000 3354 Jun 19 14:04 postinstall
-rw-rw-r-- 1 1000 1000 2985 Jun 19 14:04 postremove

The system I'm updating first is a clean install of HPUX 11i v1 from 2004.  It's the Ignite server.  The patches I'm installing are the 2008 patches.  Yes, it's old.  I'm working with what I have in hopes of making my life a little easier.

Any help would be appreciated.

 

Thanks!

5 REPLIES 5
ColinMA_42
Occasional Advisor

Re: Postinstall script failing during swinstall, exit code 1

I will add that my changing the ownership of the patch directory to root:sys, changed the tmp files to be owned by root:sys, but the run permission is still missing, so the errors continue.

Re: Postinstall script failing during swinstall, exit code 1

The error message doesn't seem to indicate that it couldn't execute the file, but that the return code was 1.

Have you looked at the contents of the postinstall script to see what might cause it to exist with a rc of 1? Is there a more detailed output log you can get (does the swinstall command not list a swjob command you can run for more details?)

Duncan


I am an HPE Employee
Accept or Kudo
ColinMA_42
Occasional Advisor

Re: Postinstall script failing during swinstall, exit code 1

If I actually make the file executable, it installs without issue.  The exit code 1 in the file is here:

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

if [ ! -f $UTILS ]; then
echo "ERROR: Cannot find $UTILS"
exit 1
fi

This file exists and running a little one liner works:

# if [ -f /usr/lbin/sw/control_utils ]; then echo "Found it!"; else echo "Missing."; fi
Found it!

When I exec the file as root:

srs057:/var/tmp/BAAa03155/catalog/PHKL_30310/pfiles# ./postinstall
sh: ./postinstall: Execute permission denied.

This is consistent across most of the patch installs.  I've found a workaround, but it's definitely NOT ideal:  After swinstall has extracted all the files into /var/tmp and I get the first error:

chown -R 667 /var/tmp/

This lets the installation continue without any issues, unless the checkinstall script fails.  I just noticed these ones in the logs.  Some packages can't even run the 'checkinstall', so they fail with no real way to recover them.

 

Re: Postinstall script failing during swinstall, exit code 1

what is roots umask set to when you run the swinstall? 

 

(I would have though that swinstall would override your umask anyway, but maybe not?)


I am an HPE Employee
Accept or Kudo
ColinMA_42
Occasional Advisor

Re: Postinstall script failing during swinstall, exit code 1

The umask is 022.

So this all might come down to my lack of experience with HPUX.  I am a Linux admin by trade. 

I downloaded a series of patches from HPe's site, and was of course given instructions to build a depot prior to installation.  Following this, the installation went off without a hitch.  I suppose this is the correct way to do things; create and upload an inventory.xml file and download all the patches, create a depot and install...

Is this my issue?  I've been dropping the GOLDQPK11i directories from DVD on an NFS share and attempting to install them from there...