swverify(8) — SD 2.0 Release
NAME
swverify − Verify software products
SYNOPSIS
swverify [-v] [-d|-r] [-x option=value] [-X option_file] [-f file] [-t target_file] [-S session_file] [software_selections] [ @ target_selections]
DESCRIPTION
The swverify command verifies the software_selections at one or more target_selections (e.g. root filesystems). When verifying installed software, swverify checks software states, dependency relationships, file existence and integrity, in addition to executing vendor-supplied verification scripts. When verifying available software (within a depot), swverify performs all of those checks but does not execute the vendor-supplied verification scripts.
The swverify command also supports these features:
• verify whether installed or configured software is compatible with the hosts on which that software is installed.
• verify that all dependencies (prerequisites, corequisites) are being met (for installed software) or can be met (for available software).
• execute vendor-specific verify scripts if the software products are configured. The most important information that can be conveyed during verification is that information pertaining to the correctness of the product’s configuration - and most of this information must be presented by the vendor in the verify script.
• report missing files, check all file attributes (ignoring writable files). These attributes include permissions, file types, size, checksum, mtime, link source and major/minor attributes.
Options
swverify supports the following options:
-v Turns on verbose output to stdout. (The swverify logfile is not affected by this option.) Verbose output is enable by default, see the verbose option below.
-d Operate on a depot rather than installed software.
-r Operate on an alternate root rather than /. Verify scripts are not run when verifying software in an alternate root directory.
-x option=value Set the session option to value and override the default value (or a value in an alternate options_file specified with the -X option). Multiple -x options can be specified.
-X option_file Read the session options and behaviors from options_file.
-f file Read the list of software_selections from file instead of (or in addition to) the command line.
-t target_file Read the list of target_selections from target_file instead of (or in addition to) the command line.
-S session_file Execute swverify based on the options and operands saved from a previous session, as defined in session_file.
Operands
The swverify command supports the following syntax for each software_selection:
product[.subproduct][.fileset][,version]
The version component supports either of these syntaxes:
[r=revision][,a=arch][,v=vendor][,vid=vendor_uuid][,l=location]
[instance_id]
The swverify command supports the following syntax for each target_selection:
[host][:][/directory]
EXTERNAL INFLUENCES
Defaults File
In addition to the standard options, several swverify behaviors and policy options can be changed by editing the default values found in:
/var/adm/sw/defaults - the system-wide default values,
$HOME/.sw/defaults - the user-specific default values.
Values must be specified in the defaults file using this syntax:
swverify.option=value
The default values can be overridden by specifying an options file with the -X option, or by specifying -x option=value on the command line.
Command Options
These defaults are used to define sources and target as well as output (stdout and logging):
swverify.target_directory=/var/spool/sw
Defines the default location of the target depot.
swverify.verbose=1
Controls the verbosity of the swverify output (stdout). A value of 0 disables output to stdout. (Error and warning messages are always written to stderr). A value of 1 enables verbose messaging to stdout.
swverify.loglevel=1
Controls the log level for the events logged to the command logfile, and the target agent logfile. A value of 1 enables verbose logging to the logfiles. A value of 2 enables very verbose logging to the logfiles.
swverify.logfile=/var/adm/sw/swverify.log
This is the default command log file for the swverify command.
swverify.select_local=true
If no target_selections are specified, select the default root directory /, or the default target_directory (when operating on depots), at the local host as the target of the command.
swverify.targets=
Defines the default target_selections. There is no supplied default (see select_local above). If there is more than target selection, they must be separated by spaces.
swverify.software=
Defines the default software_selections. There is no supplied default. If there is more than software selection, they must be separated by spaces.
Target Task Options
These defaults are used to affect target behaviors. The are organized by when they are used in the process:
swverify.mount_all_filesystems=true
By default, the swverify command attempts to automatically mount all filesystems in the /etc/checklist file at the beginning of the analysis phase, to ensure that all listed filesystems are mounted before proceeding. This policy helps to ensure that files which may be on umounted filesystems are available to be verified.
If set to false, the mount operation is not attempted, and no check of the current mounts is performed.
swverify.allow_incompatible=false
Causes swverify to generate an ERROR message for each software selection which is not "compatible" with a given target. (All of the target selections must match the list of supported systems defined for each selected product.) If set to true, swverify generates a WARNING message instead.
swverify.enforce_dependencies=true
Requires that all dependencies specified by the software_selections be resolved at the target_selections.
The swverify command will generate an ERROR message for each unresolved dependency specified by each software selection. If set to false, swverify will generate a WARNING message instead.
swverify.allow_multiple_versions=false
Causes swverify to generate an ERROR message for each software selection which is one of multiple versions of a product installed on the same root filesystem. If set to false, swverify will generate a WARNING message instead.
swverify.check_permissions=true
Causes swverify to verify the mode, owner, UID, group, and GID attributes of installed files. If set to false, these attributes are not verified.
swverify.check_contents=true
Causes swverify to verify the timestamp, size, and checksum attributes of files. If set to false, these attributes are not verified.
swverify.check_scripts=true
Causes swverify to run the fileset/product verify scripts for installed software. If set to false, these scripts are not executed.
swverify.check_requisites=true
Causes swverify to verify that the prerequisite and corequisite dependencies of the software selections are being met. If set to false, these checks are not performed.
swverify.check_volatile=false
Causes swverify to not verify those files marked as volatile (i.e. can be changed). If set to true, volatile files are also checked (for installed software).
Remote Procedure Call Options
These options apply to the DCE Remote Procedure Call used by swverify:
swverify.rpc_binding_info=ncadg_ip_udp:[2121]
Defines the protocol sequence(s) and endpoint(s) which will be used to contact swagentd. This value should be consistent among all hosts that work together. See sd(5) for details on specifying this option.
swverify.rpc_timeout=5
Relative length of the communications timout. This is a value in the range from 0 to 9 and is interpreted by the DCE RPC. Higher values mean longer times; you may need a higher value for a slow or busy network. Lower values will give faster recognition on attempts to contact hosts that are not up, or are not running the swagentd.
Session File
Each invocation of the swverify command defines a verify session. The invocation options, source information, software selections, and target hosts are saved before the verify session actually commences. This session is saved to the file $HOME/.sw/sessions/swremove.last. This session can be re-executed by using the file as input to swverify (with the -S option.)
The session file uses the same syntax as the defaults files. Values in the defaults file are overridden by values from a session file, if specified. These are in turn overidden by the corresponding command line option or parameter(s), if specified.
Environment Variables
The swverify program sets these environment variables for use by the verify scripts being executed:
SW_PATH
A PATH variable which defines a minimum set of commands available to for use in a control script.
SW_ROOT_DIRECTORY
Defines the root directory in which the session is operating, either "/" or an alternate root directory. This variable tells control scripts the root directory in which the products are installed. A script must use this directory as a prefix to SW_LOCATION to locate the product’s installed files.
SW_LOCATION
Defines the location of the product, which may have been changed from the default product directory. When combined with the SW_ROOT_DIRECTORY, this variable tells scripts where the product files are located.
SW_CONTROL_DIRECTORY
Defines the current directory of the script being executed, either a temporary catalog directory, or a directory within in the Installed Products Database (IPD). This variable tells scripts where other control scripts for the software are located (e.g. subscripts).
Signals
The swverify command catches the signals SIGQUIT and SIGINT. If these signals are received, swverify prints a message, sends a Remote Procedure Call (RPC) to the agents to wrap up, and then exits.
RETURN VALUES
The swverify command returns:
0 The software_selections were successfully verified.
1 The verify operation failed on all target_selections.
2 The verify operation failed on some target_selections.
DIAGNOSTICS
The swverify command writes to stdout, stderr, and to specific logfiles.
Standard Output
The swverify command writes messages for significant events. These include:
• a begin and end session message,
• selection, analysis, and execution task messages for each target_selection.
Standard Error
The swverify command also writes messages for all WARNING and ERROR conditions to stderr.
Logging
The swverify command logs summary events the host where the command was invoked. It logs detailed events to the swagent logfile associated with each target_selection.
Command Log
The swverify command logs all stdout and stderr messages to the the logfile /var/adm/sw/swverify.log. (The user can specify a different logfile by modifying the logfile option.)
Target Log
A swagent process performs the actual verify operation at each target_selection. When verifying installed software, the swagent logs messages to the file var/adm/sw/swagent.log beneath the root directory (e.g. / or an alternate root directory). When verifying available software (within a depot), the swagent logs messages to the file swagent.log beneath the depot directory (e.g. /var/spool/sw).
EXAMPLES
Verify the C and Pascal products installed at the local host:
swverify cc pascal
Verify the C and Pascal products on remote hosts:
swverify cc pascal @ hostA hostB hostC
Verify a particular version of HP Omniback:
swverify omniback,1=/opt/omniback_v2.0
Verify the entire contents of a local depot:
swverify -d @ /var/spool/sw
FILES
/var/adm/sw/
The directory which contains all of the configurable (and non-configurable) data for SD. This directory is also the default location of logfiles.
/var/adm/sw/defaults
Contains the system-wide default values for some or all SD options.
$HOME/.sw/defaults
Contains the user-specific default values for some or all SD options.
$HOME/.sw/sessions/
Contains session files automatically saved by the SD commands, or explicitly saved by the user.
/var/adm/sw/products/
The Installed Products Database (IPD), a catalog of all products installed on a system.
/var/spool/sw/
The default location of a target software depot.
AUTHOR
swverify was developed by the Hewlett-Packard Company.
SEE ALSO
swacl(8), swagentd(8), swconfig(8), swcopy(8), swdepot(8), swinstall(8), swlist(8), swpackage(8), swremove(8), swpackage(4), sd(4), sd(5), and the HP OpenView Software Distributor Administrator’s Guide.
Hewlett-Packard Company — Software Distributor 2.0