Re: mkinstallp/installp pre/post run scripts in the wrong order



linux@xxxxxxxxxxxxx wrote:
I am having a strange problem with installp.
The packages I create are running the scripts at the wrong time.
I have been able to duplicate this on AIX 5.2 and 5.3 so I think it is
something I am doing.

Any suggestions?

Here is a snipit of my template file
Unpre-installation Script: /autobuild/rel/AIX/app/opt/unpre_i
echo Running unPre-install
/opt//app/bin/appctl stop

Post-installation Script: /autobuild/rel/AIX/app/opt/post_i
echo Running Post Install
mkdir -m 755 -p /var/app/log

Unpost-installation Script: /autobuild/rel/AIX/app/opt/unpost_i
echo Running Post unpost_i


# installp -a -d ./app-AIX_5.2_ppc-opt.4.04.09.00.bff all
+-----------------------------------------------------------------------------+
Pre-installation Verification...
+-----------------------------------------------------------------------------+
Verifying selections...done
Verifying requisites...done
Results...

SUCCESSES
---------
Filesets listed in this section passed pre-installation verification
and will be installed.

Selected Filesets
-----------------
app-AIX_5.2_ppc-opt 4.4.9.0 # app

<< End of Success Section >>

FILESET STATISTICS
------------------
1 Selected to be installed, of which:
1 Passed pre-installation verification
----
1 Total to be installed

+-----------------------------------------------------------------------------+
Installing Software...
+-----------------------------------------------------------------------------+

installp: APPLYING software for:
appt-AIX_5.2_ppc-opt 4.4.9.0

Running Post Install
chown: /opt/app: A file or directory in the path name does not exist.
<SNIP>

Finished processing all filesets. (Total time: 4 secs).

+-----------------------------------------------------------------------------+
Summaries:
+-----------------------------------------------------------------------------+

Installation Summary
--------------------
Name Level Part Event
Result
-------------------------------------------------------------------------------
app-AIX_5.2_ppc-opt 4.4.9.0 USR APPLY SUCCESS
app-AIX_5.2_ppc-opt 4.4.9.0 ROOT APPLY SUCCESS



# installp -u app-AIX_5.2_ppc-opt
+-----------------------------------------------------------------------------+
Pre-deinstall Verification...
+-----------------------------------------------------------------------------+
Verifying selections...done
Verifying requisites...done
Results...

SUCCESSES
---------
Filesets listed in this section passed pre-deinstall verification
and will be removed.

Selected Filesets
-----------------
app-AIX_5.2_ppc-opt 4.4.9.0 # app

<< End of Success Section >>

FILESET STATISTICS
------------------
1 Selected to be deinstalled, of which:
1 Passed pre-deinstall verification
----
1 Total to be deinstalled

+-----------------------------------------------------------------------------+
Deinstalling Software...
+-----------------------------------------------------------------------------+

installp: DEINSTALLING software for:
app-AIX_5.2_ppc-opt 4.4.9.0

Running Post unpost_i
Running unPre-install.
./app-AIX_5.2_ppc-opt.unpre_i[2]: /opt/app/bin/appctl: not found.

WARNING: deinstal: Problem executing ./app-AIX_5.2_ppc-opt.unpre_i.
Continuing...

Finished processing all filesets. (Total time: 2 secs).

+-----------------------------------------------------------------------------+
Summaries:
+-----------------------------------------------------------------------------+

Installation Summary
--------------------
Name Level Part Event
Result
-------------------------------------------------------------------------------
app-AIX_5.2_ppc-opt 4.4.9.0 ROOT DEINSTALL SUCCESS
app-AIX_5.2_ppc-opt 4.4.9.0 USR DEINSTALL SUCCESS

There are ROOT part, USR part, and SHARE part scripts;
just like there is a inst_root/liblpp.a and a liblpp.a.
On the install the USR part is installed first, then
the ROOT part. On uninstall the ROOT part is done first,
then the USR part.

The USR part scripts are allowed to modify files in the
/usr filesystem. The share part scripts are allowed to
modify files in the /usr/share tree. The ROOT part scripts
are allowed to modify files in the / filesystem, except
for /usr and /usr/share.

The /opt filesystem is a ROOT part filesystem.
For example see:
lslpp -f bos.rte
and notice how /opt comes after:
Path: /etc/objrepos
same with /var, so your post_i has to be ROOT part
(because it creates /var files), your unpre_i has
to be ROOT part (so that it is run first on uninstall),
and your unpost_i has to be ROOT part (so that the
application files all exist).

When debugging installp images I suggest doing:
export INST_DEBUG=yes
installp ...
and you should see tons of output as installp
processes your bff image.

Paul Landay
.



Relevant Pages

  • Re: MAssive Performance hit after AIX 4.3 -> 5.2 upgrade!!
    ... SVMON FAILURE!!! ... The number of selected filesets that are either already installed ... installp: APPLYING software for: ... SUCCESS ...
    (comp.unix.aix)
  • Updateall error
    ... All the other filesets installed ... installp: APPLYING software for: ... 0503-037 inurest: Failure on system call to execute ...
    (AIX-L)
  • Re: MAssive Performance hit after AIX 4.3 -> 5.2 upgrade!!
    ... The number of selected filesets that are either already installed ... installp: APPLYING software for: ... US Government Users Restricted Rights - Use, ... SUCCESS ...
    (comp.unix.aix)
  • Re: MAssive Performance hit after AIX 4.3 -> 5.2 upgrade!!
    ... The number of selected filesets that are either already installed ... installp: APPLYING software for: ... US Government Users Restricted Rights - Use, ... SUCCESS ...
    (comp.unix.aix)
  • Re: Filesets installed
    ... "Michael S. Androsov" schrieb im Newsbeitrag ... >> was that the only fileset that was not found and did the others install? ... This is the 'r' option of installp, ...
    (comp.unix.aix)