installp
PURPOSE
Installs a program.
SYNOPSIS
installp [ [ -d device ] [ -n name ] ]
DESCRIPTION
Warning: Before you install a program, you must restart
your system and be sure that no other users are on the
system and no other programs are running.
The installp command installs a program. You must be a
member of the system group or operating with superuser
authority to run this command.
Because more than one program may be on a set of
diskettes, installp asks whether or not you want to
install each program. If you do, installp checks to see
if it is an older version than the one currently
installed. If the version to be installed is older than
the version on the system, installp informs you and asks
if you want to continue.
When installp is instructed to perform the installation
of a program subset for code service clients on a system
where the complete program is already installed, it
checks to see if the program subset is compatible with
the existing complete program. If the program subset and
complete program are incompatible, installp warns you and
then prompts you for a response.
The installp command makes a backup copy of the program
history file before installation begins. If installation
is not successful, it sets the Version, Release, and
Level fields of the last record of the history file to
00.00.0000 and logs the exit value in the program history
file. The history file remains on the system as
/usr/lpp/pgm-name/lpp.hist, where pgm-name is the program
name.
You cannot use INTERRUPT (Alt-Pause) to stop the installp
command. To stop installp, press QUIT WITH DUMP
(Ctrl-V). This should be used only in extreme circum-
stances since the state of the system cannot be predicted
and one of the following may occur:
o The write-verify feature may be left on for all mini-
disks
o All terminals other than the console may be disabled
o Some install control files may need to be deleted.
Notes:
1. Only ordinary files with the prefix lpp. remain in
/usr/lpp/pgm-name after completion of installp. All
other ordinary files are removed.
2. Installing a complete program on a client where a
program subset already exists will cause the history
file information for the program subset to be
destroyed.
FLAGS
-b Runs the bffcreate command to create an
installation file in backup format from the
distribution media. Then tells installp to
use the file as the distribution media for
the install. A server in a code service
environment uses this flag to install.
-d device Installs the program from the specified
device. The default device is /dev/rfd0.
-n name Logs the first eight nonblank characters of
name in the program history file. The
default name is the value of the environment
variable $LOGNAME.
-q Runs in quiet mode suppressing most of the
interactive queries.
The installp command runs a program-provided installation
procedure instal. Each installation procedure returns
one of the following exit values to installp:
0 Installation completed; take no action.
2 Update superblocks, i-nodes, and delayed block I/O
(sync), then restart the VRM.
3 Build the kernel, then update the superblocks,
i-nodes, and delayed block I/O (sync) and shut down
the VRM.
4 Build the kernel, then update the superblocks,
i-nodes, and delayed block I/O (sync) and restart the
VRM.
5 Installation cancelled without errors.
6 Update superblocks, i-nodes, and delayed block I/O
(sync), then shut down the VRM.
Any other return value indicates that installation
failed.
INTERNAL COMMANDS
Install procedures can use the internal install commands.
These commands provide common code for the save and
recovery functions frequently needed by most program-
provided procedures. They do a minimum validation of
input parameters and return exit values like subcommands.
You can, however, receice messages from system commands
that they call. C Language procedures that call these
commands can use the /usr/include/inu21.h file to define
return codes.
inusave
The inusave command saves some or all of the files and
archive files that will be changed during a program
install or update procedure. It uses the following
syntax:
inusave listfile pgm-name
The pgm-name parameter specifies the program to be
installed or updated. pgm-name can be a maximum of 8
characters. listfile, which must be a full path name,
contains a list of relative path names (relative to the
root) for all of the files that need to be saved.
listfile must be in the format of an apply list (see AIX
Operating System Programming Tools and Interfaces for a
discussion of the format of an apply list).
The inusave command creates the save directory
(/usr/lpp/pgm-name/inst_updt.save). This is the direc-
tory in which the install and update procedures store
saved files and the control list that correlates the
local file names with their full path names. inusave
uses listfile as a basis to determine which files need to
be temporarily saved.
If the file named in listfile already exists, inusave
copies that file to
/usr/lpp/pgm-name/inst_updt.save/update.n, where n is an
integer assigned by inusave. If the file does not exist,
inusave assumes that this entry in listfile represents
either a new file or a file to be archived or processed
by the archive procedure. inusave maintains a list of
saved files in
/usr/lpp/pgm-name/inst_updt.save/update.list. The format
of each entry in the list is:
update.n file
where update.n is the name of the saved file and file is
the full path name of the file.
An archived constituent file is saved if there is a valid
archive control file, /usr/lpp/pgm-name/lpp.acf, for the
program. If this file exists, inusave compares each of
the file names in listfile to the constituent file names
in /usr/lpp/pgm-name/lpp.acf. When it finds a match,
inusave uses the ar command to extract the constituent
file from its associated archive file.
It then moves it to
/usr/lpp/pgm-name/inst_updt.save/archive.n, where n is an
integer selected by inusave. inusave maintains a list of
the extracted files that have been saved in the file
/usr/lpp/pgm-name/inst_updt.save/archive.list. The
format of each entry in the list is:
archive.n cfile afile
where archive.n is the name of the saved file and cfile
and afile are the constituent and archive files defined
in the archive control file.
The inusave command returns the following exit values:
0 No error conditions occurred.
105 Failure occurred trying to create a save directory.
107 Copy of a file from one directory to another failed.
This implies that the update apply has not yet begun
and that the old level of the program is still
usable.
202 One or more parameters missing.
204 Too many parameters were entered.
207 Could not access the apply list.
inurecv
The inurecv command recovers all files and archive-
constituent files saved from the previous inusave.
inurecv uses the following syntax:
inurecv pgm-name reject-flag
It uses the control lists from the
/usr/lpp/pgm-name/inst_updt.save directory to recover the
files. inusave creates the
/usr/lpp/pgm-name/inst_updt.save directory and control
lists. inurecv also recovers files that may have been
saved by the program-provided install or update procedure
(see AIX Operating System Programming Tools and Inter-
faces for details).
The inurecv command has to distinguish between an imme-
diate recovery that occurs because of an error condition
during an install or update and an update rejection that
occurs because a user rejects an update ("updatep -r").
If the reject-flag argument is yes, inurecv assumes that
it is being run because of an update rejection. If the
argument is no or if no flag is specified, inurecv
assumes that it is being run because of an immediate
recovery.
The inurecv command returns the following exit status
values:
0 No error conditions occurred.
101 The save directory does not exist.
102 A copy of a file from one directory to another
failed. This implies that the program could not be
recovered and that it must be reinstalled and any
updates reapplied.
104 A file that was saved in the save directory was not
found.
205 Replacement of a constituent file in an archive file
failed while attempting to recover a program. This
implies that the program is no longer useable and
should be reinstalled and any updates reapplied.
inurest
The inurest command does simple restores and archives.
It does not do any additional processing or user inter-
action. inurest uses the following syntax:
inurest [-ddevice] [-q] listfile pgm-name
The listfile is the full path name of a file containing
the relative directory target path name (relative to the
root), of files that a program needs to restore. It must
be in the format of an apply list. inurest restores all
files in the list relative to the root directory.
pgm-name specifies the name of the program to be
installed or updated. It can be a maximum of 8 charac-
ters.
To archive a file, there must be an archive control file,
/usr/lpp/pgm-name/lpp.acf. If it exists, inurest com-
pares each of the target names in listfile to the compo-
nent files listed in there. Whenever inurest finds a
match, it archives the restored file into the corre-
sponding archive file and deletes the restored file.
FLAGS: The following flags modify the action of inurest:
-d device Specifies the input device. The default device
is /dev/rfd0.
-q Prohibits restore from displaying the "insert
volume 1" prompt.
The inurest command returns the following exit status
values:
0 No error conditions occurred.
106 Failed trying to restore an updated version of
files.
201 An invalid flag was specified.
202 One or more parameters missing.
204 Too many parameters were entered.
206 Failed trying to replace file in an archive file.
208 Could not access the apply list.
ckprereq
The ckprereq command determines whether the system level
is compatible with the program to be installed or
updated. It uses the following syntax:
ckprereq [-v] [-f prerequisites]
You can run ckprereq only if you are a member of the
system group or are operating with superuser authority.
prerequisites is a program prerequisite list file. Each
record in this file contains the name of a prerequisite
program and describes the version, release, and level
requirements. There is one record for each prerequisite
program. The default prerequisites file is prereq. See
AIX Operating System Programming Tools and Interfaces for
details on the format of ckprereq file entries.
The ckprereq command tests the current version, release,
and level found in the history file and marks each
"prereq state" field of the prereq file with one of the
following codes if the test fails:
l The test is false for level.
f The history file format is not fixed 80.
n The history file was not found.
r The test is false for release.
s There is a syntax error in the prereq file.
u The history file is in an unknown state.
v The test is false for version.
A blank "prereq state" field indicates that the test was
true. The exit value of ckprereq is the number of
records that did not test true. If all records test
true, the exit value is 0.
Note: If a program is installed on a local node and exe-
cuted on a remote node, the remote node must have file
trees that have all necessary prerequisite files avail-
able.
FLAGS
-f prerequisites Specifies the prerequisites file to use
in place of prereq.
-v Sends a descriptive message to standard
error for each failure in the prerequi-
site program test. The messages give
the same information as the prereq
state field of the prereq file.
mvmd
The mvmd command updates the VRM minidisk. It uses the
following syntax:
mvmd -a file -D VRM-dir [-fp [file]] -l pgm-name
mvmd -c VRM-file permissions -l pgm-name
mvmd -d VRM-file -l pgm-name
mvmd -m VRM-file [-fp [file]] -l pgm-name
mvmd -r file -D VRM-dir -l pgm-name
You must be a member of the system group or operating
with superuser authority to run mvmd.
FLAGS
-a file Adds the specified file to the VRM mini-
disk. Use the -D flag to specify the des-
tination VRM directory. file must not
already exist in the specified directory.
By default, mvmd adds the file to the first
unused position in the VRM directory. To
specify a position, use the -f or -p flag.
-c VRM-file permissions
Changes the permission code of the speci-
fied VRM-file to the octal value, permis-
sions. The VRM-file parameter must be a
full path name. Valid combinations of per-
mission bits are as follows:
0700 The loadlist processor loads, runs,
and deletes this module.
0450 The loadlist processor transfers
control to this module after all
loadlist directory entries have been
processed.
0440 The loadlist processor loads this
module.
0410 This module is a virtual machine.
0040 If the system startup device is a
diskette, the loadlist processor is to
load the module. If the system
startup device is a fixed disk, the
loadlist processor does not load the
module. Instead, it maps the module.
The loadlist processor ignores any module
that does not have the load bit set. For
more information about these permission
bits, see Virtual Resource Manager Tech-
nical Reference.
-d VRM-file Deletes the specified file from the VRM
minidisk. The VRM-file parameter must be a
full path name.
-D VRM-dir Specifies the full path name of the VRM
directory.
-f [file] Specifies the position following file in
the directory list or, if you do not
specify file, the bottom of the directory
list. Use this positioning flag with the
-a or -m flags.
-l pgm-name Specifies the name of a program that is
modifying the VRM minidisk. The pgm-name,
the date, the user name, and a descriptive
title are place in a record appended to the
VRM history file. If you do not specify
this flag, then a record with the name
"UNKNOWN" is appended to the VRM history
file.
-m VRM-file Moves the specified file within its VRM
directory. By default, mvmd moves the file
to the first unused position. To specify a
position, use the -f or -p flag.
-p [file] Specifies the position prior to file in the
directory list or, if you do not specify
file, the top of the directory list. Use
this positioning flag with the -a or -m
flags.
-r file Replaces the specified file on the VRM
minidisk. Use the -D flag to select the
VRM directory of the file to be replaced.
Both the replacement file and the file to
be replaced must have the same name.
The mvmd command returns an exit status of 0 if no errors
occurred. A nonzero return indicates that an error did
occur.
FILES
/usr/include/inu21.h Defines error codes for
internal commands.
/usr/lpp/pgm-name/instal Program installation proce-
dure.
/usr/lpp/pgm-name/inst_updt.save
Directory for saved files.
/usr/lpp/pgm-name/inst_updt/inuPIDtempn
Temporary files.
/usr/lpp/pgm-name/liblpp.a Central archive file.
/usr/lpp/pgm-name/lpp.acf Archive control file.
/usr/lpp/pgm-name/lpp.hist Program history file.
/usr/lpp/pgm-name/prereq Program prerequisite list
file.
RELATED INFORMATION
The following commands: "updatep" and "bffcreate."
The discussion of code service in Managing the AIX Oper-
ating System.
The fork and exec system calls and the lpp.hist file in
AIX Operating System Technical Reference.
The discussion of installing programs in AIX Operating
System Programming Tools and Interfaces.