HP-UX Reference (11i v2 07/12) - 1M System Administration Commands N-Z (vol 4)

s
swinstall(1M) swinstall(1M)
checkinstall a script executed during the analysis of a
target_selection
,itchecks
that the installation can be attempted. If this check fails, the software pro-
duct is not installed.
preinstall a script executed immediately before the software’s files are installed.
postinstall a script executed immediately after the softwares files are installed.
configure a script executed during the configuration of a target_selection, it configures
the target for the software (and the software for the target). The
prein-
stall
and postinstall scripts are not intended to be used for
configuration tasks. They are to be used for simple file management needs
such as removing obsolete files from the previous revision (which was just
updated).
unpreinstall a script executed immediately after the softwares actual files are restored if
the software install will fail and the autorecover_product
option is set
to
true. The script undoes the steps performed by
preinstall script.
unpostinstall a script executed immediately before the software’s actual files are restored if
the software install failed and the
autorecover_product
option is set
to
true. The script undoes the steps performed by postinstall script.
When a depot is created or modified using swcopy, catalog files are built that describe the depot
(comparable to the Installed Products Database (IPD) files that are built by the
swinstall
command).
By default, the swinstall command only allows the selection of compatible software from the
source. This constraint ensures that the architecture of the software matches that of the
target_selections. No compatibility checks are performed by the
swcopy command. (A depot can
be a repository of software targeted for a variety of architectures and operating systems.)
By default,
swinstall supports updates to higher revisions of software. If a software_selection
of the same revision is already installed, swinstall will not reinstall it. If a software_selection
has a lower revision than the same software which is already installed, swinstall will not rein-
stall it. (The user can override these behaviors with control options.)
The swinstall command creates hard links and symbolic links as specified for the software. If
it encounters a symbolic link where it expected a regular file, swinstall follows the symbolic
link and updates the file to which it points.
The swinstall command does not remove a product’s current files before installing the new
ones. A leset’s install scripts can do that, if necessary. Files being replaced are overwritten
unless they are in use. If in use, they are unlinked or moved to #<file>. If the
autorecover_product option is set to
true; all files are saved to #<file>, and restored if the install
fails.
The
swinstall command supports kernel building scripts and rebooting. Before or after
software that modifies the kernel is installed or updated, swinstall executes system-specific
scripts to prepare for or build the new version of the kernel. The remaining software_selections are
then installed. These scripts are defined in
swagent options and include:
install_setup_cmd, system_prep_cmd, kernel_build_cmd
, and
install_cleanup_cmd. Please Note: Transition links do not exist on 11.31 and newer
releases so there are no install setup and cleanup steps to perform; therefore, the
install_setup_cmd and install_cleanup_cmd
are never executed for these releases.
After software that requires a system reboot is installed or updated,
swinstall automatically
reboots the system. The reboot command is defined by the swagent option: reboot_cmd .
When updating the operating system (see update-ux(1M) for more information.), you should install
kernel software first to ensure that a new kernel can be generated before the rest of the operating
system is updated. After all the software_selections are updated or installed, swinstall
reboots using the new kernel, then executes the configure scripts for each software_selection. After
these scripts complete, it reboots the system again to restore it to its normal state.
No kernel building or system reboots are performed by
swcopy.
Both the swinstall and swcopy commands perform various checks prior to installing or
copying the software_selections, for example disk space analysis.
454 Hewlett-Packard Company 3 HP-UX 11i Version 2: December 2007 Update