swverify - verify software
swverify [-d][-r][-F][-f file][-t targetfile][-x option=value]
[-X options_file][software_selections][@ targets]
The swverify utility checks the accuracy of software in distributions and installed_software. The utility checks the integrity of directory structures and the files. Discrepancies are reported on stderr along with a detailed explanation of the problem.
The swverify utility supports the following options. Where there is no description, the description inCommon Definition for Utilities .
- -d
- -f file
- -F
Correct problems as well as report them.If check_permissions=true, correct the corresponding problems reported.
If check_scripts=true, correct the corresponding problems reported.
The -F option only applies to installed software.
- -r
- -t targetfile
- -x option=value
- -X options_file
The swverify utility supports the software_selections and targets operands described inCommon Definition for Utilities .This utility need not support a target distribution in the serial format.
SeeCommon Definition for Utilities . for descriptions of external influences common to all utilities.
Extended Options
The swverify utility supports the following extended options. The description in
Common Definition for Utilities applies.
- allow_incompatible=false
- autoselect_dependencies=true
- check_contents=true
- check_permissions=true
- check_requisites=true
- check_scripts=true
- check_volatile=false
- distribution_target_directory=implementation_defined_value
- enforce_dependencies=true
- enforce_locatable=true
- installed_software_catalog=implementation_defined_value
- logfile=implementation_defined_value
- loglevel=1
- select_local=true
- software=
- targets=
- verbose=1
SeeCommon Definition for Utilities .
SeeCommon Definition for Utilities for general information. The key phases in the swverify utility are:
- Selection phase
- Analysis phase
- Execution phase.
Selection Phase
Like swremove, software selections apply to the software installed (or available in the case of a distribution).
Each specified selection is added to the selection list after it passes the following checks:
- If the selection is not found, generate an event.
[SW_WARNING: SW_SELECTION_NOT_FOUND]
- If the selection is not found at that product location, but that product exists at another location, generate an event.
[SW_WARNING: SW_SELECTION_NOT_FOUND_RELATED]
Add any dependencies to the selection list if autoselect_dependencies=true.
Analysis Phase
This section details the analysis phase for swverify. No aspect of the target host environment is modified unless the -F option is specified. The target role accesses its software_collection catalog to get the information for the selected software. The target role makes the following checks:
- An event is generated for each product that is incompatible with the
uname attributes of the target host. See Software Compatibility . If allow_incompatible=false, generate an event.
[SW_ERROR: SW_NOT_COMPATIBLE]If allow_incompatible=true, generate an event.
[SW_WARNING: SW_NOT_COMPATIBLE]
Applies to installed software.
- An event is generated for each fileset whose state is other than installed, configured, available, or removed.
[SW_WARNING: SW_SELECTION_IS_CORRUPT]Applies to distributions and installed software.
- An event is generated if a dependency can not be met. If enforce_dependencies=true, generate an event.
[SW_ERROR: SW_DEPENDENCY_NOT_MET]If enforce_dependencies=false, generate an event.
[SW_WARNING: SW_DEPENDENCY_NOT_MET]Applies to distributions and installed software.
- Executes vendor-supplied verify scripts, generating an event if a verify script returns either an error or a warning.
[SW_ERROR: SW_CHECK_SCRIPT_ERROR]
[SW_WARNING: SW_CHECK_SCRIPT_WARNING]Applies to installed software.
- The following file level checks are made:
- Check for missing files and directories. For installed software, if check_volatile=false, then this check must not be made for files with file.is_volatile=true.
Applies to distributions and installed software.
- Check for files that have been modified.
- For distributions,
check size, cksum, and mtime.
- For installed software,
check mode, owner, group, size, cksum, mtime, revision, major, and minor, if defined for that file object.
If check_volatile=false, then these checks must not be made for files with file.is_volatile=true.
- If a file is compressed, then the compressed_size and compressed_cksum attributes of the file should be checked instead of the size and cksum attributes.
Applies to distributions.
- Check symbolic links for correct values.
Applies to distributions and installed software.
If any of these checks fail for any file, generate an event.
[SW_ERROR: SW_FILE_ERROR]
For patches, the verify operation on a patched fileset will check that the patched files are properly installed. When installing a patch, the ancestor fileset will be updated to have the correct attributes of the patched files. Verification of a patch fileset will verify that files in a patch are still properly installed (or in the depot correctly). For installed patches that have the fileset saved_files_directory defined, the saved files in the saved_files_directory will also be verified. This verification ensures that a patch can still be successfully rolled back.
Execution Phase
If the -F option is set, then the execution phase operations are run.
- Execute Fix Scripts
In this step, swverify executes vendor-supplied fix scripts if operating on installed software.
Scripts are executed in the same order as verify scripts. If a fix script returns an error, generate an event.
[SW_ERROR: SW_PRE_SCRIPT_ERROR]If a fix script returns a warning, generate an event.
[SW_WARNING: SW_PRE_SCRIPT_WARNING]Control scripts adhere to the specifications in section
Control Script Execution and Environment .
- File Level Fix
The following file level fixes are made:
- Missing directories are created (except volatile unless the check_volatile option is true)
- Files that have been modified (except volatile unless the check_volatile option is true) are fixed for mode, owner, group, major, and minor, as applicable
- Symbolic links are re-created to correct their values.
- Any files with type x (delete file) as a new item are removed.
If any of these fixes fail for any file, generate an event.
[SW_ERROR: SW_FILE_ERROR]
SeeCommon Definition for Utilities .
SeeCommon Definition for Utilities .
Contents | Next section | Index |