The
SD-UX swverify command verifies
available (copied), installed, or configured software products on
the specified host. swverify also:
determines whether installed or configured
software is compatible with the host on which that software is installed.
makes sure that all dependencies (prerequisites,
corequisites) are being met (for installed software) or can be met
(for copied software).
executes vendor-specific verification scripts (that
is, scripts that testify to the correctness of the product's configuration)
if the installed state of the software is configured.
reports missing files, checks all file attributes
including permissions, file types, size, checksum, mtime, link source
and major/minor attributes.
Syntax |
 |
The
swverify command does not feature
a GUI. All verify interaction with the system is done on the command
line.
The
syntax for swverify is:
swverify [-d|-r]
[-v] [-C session_file]
[-f software_file]
[-S session_file]
[-t target_file]
[-x option=value]
[-X config_file]
[software_selections][@ target_selections]
Examples |
 |
The following are examples of some swverify
commands:
To verify an installed fileset mysoft.myfileset
located on the default depot at myhosts,
you would type:
swverify -d mysoft.myfileset @ myhosts
(You could also omit the @ sign and the myhost
designation since the software being verified is assumed to be located
in the default depot on the local host.)
To verify the C and Pascal products that are installed on
the local host:
swverify C Pascal
To verify the HP Omniback product that is installed on the
local host and watch the process (-v) on stdout:
swverify -v Omniback
To verify the 2.0 version of Omniback that is installed on
the local host at /opt/Omniback:
swverify Omniback,r=2.0 @ /opt/Omniback
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
Command Options |
 |
The swverify
command options are a subset of those for swinstall
except the -d option, which
verifies software on a depot instead of installed software.
Option Description
- -d
Operate on a depot rather than installed software.
- -r
(Optional) Operate on an alternate root rather than
/. Verify scripts are not run.
- -v
Turn on verbose output to stdout
and display all activity to the screen. Lets you see the results
of the command as it executes.
- -C session file
Run the command and save the current option
and operand values to a file for re-use in another session.
- -f software file
Read a list of software selections
from a separate file instead of from the command line. In this software
file, blank lines and lines beginning with # (comments) are ignored.
Each software selection must be specified on a separate line. For
an example of a software selection file, see “Command Operands ”.
- -S session file
Run the command based on values saved from
a previous installation session.
- -t target file
Specifies multiple shared
roots on the local host. -t
reads a list of these targets from a separate file instead of from
the command line.
- -x option=value
Specify a value to override a
default value or a value in an options file (see the -X
option file option). See section “Changing Default Options” for more information
on changing defaults.
- -X option file
Specifies a new option file. The default
values for system options are provided in the file /var/adm/sw/defaults.
You can also provide a personal option file, $HOME/.swdefaults.
This option file overrides those values in the system defaults file.
For a complete listing of system options, see the file /usr/lib/sw/sys.defaults.
This file lists the possible values and behaviors for each option
for each command.
Command Operands |
 |
The swverify command
supports the standard software_selections
syntax. For more details on software selection syntax and an example
of a software selection file, see “Command Operands ”.
Changing Default Options |
 |
In addition to the command-line
option listed above, several swverify behaviors
and policy options can also be changed by editing extended option
and default values found in the system-wide defaults file: /var/adm/sw/defaults
or in the user-specific defaults file:
$HOME/.swdefaults
Values in these files are specified using the command.option=value
syntax. For example:
swverify.agent_auto_exit=true
Table 3-2 Verification
Default Options
agent_auto_exit=true | job_title= |
agent_timeout_minutes=10000 | log_msgid=0 |
allow_incompatible=false | logdetail=false |
allow_multiple_versions=false | logfile=/var/adm/sw/swverify.log |
autoselect_dependencies=true | loglevel=1 |
| check_contents=true | mount_all_filesystems=true |
| check_permissions=true | reconfigure=false |
| check_requisites=true | rpc_binding_info=ncacn_ip_tcp:2121 ncadg_ip_udp:[2121] |
| check_scripts=true | rpc_timeout=5 |
| check_volatile-false | select_local=true |
| controller_source= | software= |
| distribution_target_directory= /var/spool/sw | verbose=1 |
| enforce_dependencies=true | |
See Appendix A “Default Options
and Keywords ” for
a complete listing and description of default options.
Using Session Files |
 |
Each invocation of the swverify command
defines a configuration session. The invocation
options, source information, software selections, and target hosts
for this session are saved before the installation or copy task
actually commences. This lets you re-execute the command even
if the session ends before proper completion.
Each session configuration is automatically saved to the file
$HOME/.sw/sessions/swconfig.last. This file
is overwritten at each invocation of swconfig.
You can save a session configuration to a specific file by
executing swverify with the -C session_file
option.
If you do not specify a specific path for the session file,
the default location is $HOME/.sw/sessions/.
To re-execute a session file, specify the session file as
the argument for the -S session_file
option of swverify, using the above syntax.
Note that when you re-execute a session file, the values in
the session file take precedence over values in the system defaults
file. Likewise, any command line options or parameters that you
specify when you invoke swverify take precedence
over the values in the session file
Environment Variables |
 |
SD programs are affected by external environment variables
and environment variables set for use by control scripts. For a
description of external environment variables, see Chapter 11, Control
Scripts.
Understanding the Verification Process |
 |
The software verification process has only two key phases:
a selection phase and an analysis phase.
The analysis phase for swverify
takes place on the host. The host's environment is not modified.
The sequential analysis tasks on each host are:
Initiate analysis
Process software selections
The system accesses the Installed Products Database (IPD)
or depot catalog to get the product information for the selected
software.
For installed software, the system checks that all products
are compatible with its uname
attributes. This check is controlled by the default option allow_incompatible.
If allow_incompatible is
set to false, the system produces an error
stating that the product is not compatible with the host.
If allow_incompatible is
set to true, a warning
is issued stating that the product is not compatible.
Check states of versions
The swverify
command checks for correct states in the filesets (installed,
configured or available).
For installed software, it also checks
for multiple versions that are controlled by the allow_multiple_versions
option.
If allow_multiple_versions
is false, an error is produced that multiple
versions of the product exist and the option is disabled.
If allow_multiple_versions
is true, a warning
is issued saying that multiple versions exist.
Check dependencies
An error or warning is issued if a dependency cannot be met.
Dependencies are controlled by the enforce_dependencies
option:
If enforce_dependencies is
true, an error is generated telling you
the type of dependency and what state the product is in.
If enforce_dependencies is
false, a warning
is issued with the same information.
If the dependency is a corequisite, it must be present before
the software will operate.
If the dependency is a prerequisite, it must be present before
the software can be installed or configured.
Execute verify scripts
In this step, swverify
executes vendor-supplied verify scripts only on installed software.
A verify script is used to ensure that the configuration of
the software is correct. Possible vendor-specific tasks for a verify
script include:
Determine active or
inactive state of the product.
Check for corruption of product configuration files.
Check for (in)correct configuration of the product
into the OS platform, services or configuration files.
Vendor-supplied scripts are executed and the return values
generate an error (if 1) or a warning
(if 2).
Scripts are executed in prerequisite order.
For more information on scripts, see Chapter 11 “Using Control Scripts ”.
File level checks
File level checks are made with
swverify for:
Contents (mtime, size and checksum)
for control_files and files
Missing control_files, files
and directories
Permissions (owner, group, mode) for installed files