Saves files that are installed or updated during an installation procedure. This command is used by the installp command and the install scripts.
The inusave command saves the files and archived files that are listed in the file specified by the ListFile parameter for the ProductName software product. The inusave command is designed for use with the installp command.
The inusave command creates the /usr/lpp/PackageName/FilesetName/V.R.M.F.save directory if it does not already exist, where Level has the form vv.rr.mmmm.ffff.ppppppppp and vv = the version, rr = the release, mmmm = the modification, ffff = fix, and ppppppppp = fix ID (only for 3.2 images). This is the directory in which the installation procedures store saved files. The save directory is defined by the INUSAVEDIR environment variable.
The save directories for the / (root), /usr, and /usr/share parts of an installation are:
respectively, when set up by the installp command. The installp command calls inusave for each of these three directories. The ListFile parameter is the full path name of the file that lists the files that are to be saved if a current copy exists.
If a file named in the ListFile file already exists, the inusave command copies that file to the $INUSAVEDIR/update.n file, where n is an integer assigned by the inusave command. If the file does not exist, the inusave command assumes that this entry in the ListFile parameter represents either a new file or a file to be archived or processed by the archive procedure described later in this section.
The inusave command maintains a list of saved files in the $INUSAVEDIR/update.list file. This file is a stanza file with an entry for each saved file. Entries in the update.list file resemble the following:
/usr/bin/chkey: update.n = update.1 option = bosnet.nfs.obj _id = 209 _reserved = 0 _scratch = 0 lpp_id = 72 private = 0 file_type = 0 format = 1 loc0 = /usr/bin/chkey size = 7800 checksum = 44561 /usr/bin/domainname: update.n = update.2 option = bosnet.nfs.obj _id = 210 _reserved = 0 _scratch = 0 lpp_id = 72 private = 0 file_type = 0 format = 1 loc0 = /usr/bin/domainname size = 2526 checksum = 12439
In the previous example /usr/bin/chkey (the name of the stanza) is the name of an original file that was saved and update.1 is the name of the file in the $INUSAVEDIR directory to which it was copied. The file /usr/bin/chkey belongs to the bosnet.nfs.obj installable option of the software product bosnet. The stanza name and the first two items in the stanza (update.n and option) exist for each stanza in the update.list file. The remaining items in the stanza, which may vary, are information from the Software Vital Product Data (SWVPD) database.
An archived constituent file is saved if there is a valid archive control file, lpp.acf, in the current directory. If the lpp.acf file exists, the inusave command compares each of the file names in ListFile to the constituent file names in lpp.acf. When it finds a match, the inusave command uses the ar command to extract the constituent file from its associated archive file. It then moves the file to the $INUSAVEDIR/archive.n file, where n is an integer selected by the inusave command.
The inusave command maintains a list of the extracted files that have been saved in the $INUSAVEDIR/archive.list file. This file is a stanza file with an entry for each saved constituent file. Entries in the archive.list file resemble the following:
/prodx.filea: archive.n = archive.1 arc_name = /usr/lib/productx/libprodx.a option = productx.option1.obj _id = 833 _reserved = 0 _scratch = 0 lpp_id = 7 private = 0 file_type = 0 format = 1 loc0 = /prodx.filea loc1 = "h11,h12" loc2 = "/usr/lpp/productx.filea/s11,/usr/lpp/productx.filea/s12" size = 1611 checksum = 62793
In the previous example /prodx.filea (the name of the stanza) is the name of the original constituent file that was saved and archive.1 is the name of the file in the $INUSAVEDIR directory to which it was copied. The /usr/lib/productx/libprodx.a is the full path name of the archive file defined in the lpp.acf archive control file. The constituent file /prodx.filea belongs to the productx.option1.obj installable option of the software product productx. The stanza name and the first three items in the stanza (archive.n, arc_name, and option) will exist for each stanza in the archive.list file. The remaining items in the stanza, which may vary, are information from the SWVPD database.
|ListFile||Specifies the full path name of the file containing a list of relative path names, one per line, of files that are to be saved.|
|ProductName||Specifies the installable software product whose files are to be saved.|
|INUEXPAND||This flag is set to 1 by the installp command if file systems are to be expanded if necessary to do the save (that is, the -X flag was passed to installp). It is set to 0 if file systems are not to be expanded. If this environment variable is not set, the default is not to expand file systems.|
|INUSAVE||This flag is set to 1 by the installp command if files are to be saved (that is, the -N flag was not passed to installp). It is set to 0 if files are not to be saved. If this environment variable is not set, the default is to save files.|
|INUSAVEDIR||The full path name to the directory where files are to be saved. If this environment variable is not set, then the directory to be used is /usr/lpp/ProductName/inst_updt.save.|
|INUTEMPDIR||The directory to use for temporary space that is needed during the execution of this command. If this environment variable is not set, then the directory used is /tmp.|
The following error codes are defined in /usr/include/inuerr.h:
|INUBADSC||A save directory could not be created.|
|INUBADC2||A file could not be copied from one directory to another.|
|INUGOOD||No error conditions occurred.|
|INUNOAP1||Could not access ListFile.|
|INUTOOFW||One or more parameters were missing.|
|INUTOOMN||Too many parameters were specified.|
Privilege Control: Only the root user can run this command.
To save all the files listed in the snaserv.al file of the snaserv program, enter:
inusave /usr/lpp/snaserv/snaserv.al snaserv
|/usr/lpp/PackageName/lpp.acf||Specifies the archive control file.|
|/lpp/PackageName/FilesetName/V.R.M.F.save||Specifies the save directory for the root.|
|/usr/lpp/PackageName/FilesetName/V.R.M.F.save||Specifies the save directory for the /usr files.|
|/usr/share/lpp/PackageName/FilesetName/V.R.M.F.save||Specifies the save directory for the /usr/share files.|
The installp command, inurecv command.