HP-UX Reference (11i v1 05/09) - 1M System Administration Commands N-Z (vol 4)
s
swinstall(1M) swinstall(1M)
(HP-UX Software Distributor)
• The swinstall command executes several vendor-supplied scripts during the installation and
configuration of the software_selections. The
swcopy command does not execute these scripts.
The
swinstall command supports the following scripts:
request a script that asks the user questions and stores responses in a response file.
The response file can then be used by configuration or other scripts.
checkinstall a script executed during the analysis of a
target_selection
,itchecks
that the installation can be attempted. If this check fails, the software product
is not installed.
preinstall a script executed immediately before the software’s files are installed.
postinstall a script executed immediately after the software’s 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
preinstall
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 software’s 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 fileset’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.
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.
Section 1M−−920 Hewlett-Packard Company − 3 − HP-UX 11i Version 1: September 2005