smpatch

 





NAME

smpatch - download, add, and remove patches

SYNOPSIS

/usr/sadm/bin/smpatch add -i patchid [-i patchid ...] | -x idlist=patchlist_file [-d patchdir] [-h] /usr/sadm/bin/smpatch analyze [-h] /usr/sadm/bin/smpatch download [ -i patchid [-i patchid ... ] | -x idlist=patchlist_file ] [-d patchdir] [-h ] /usr/sadm/bin/smpatch remove -i patchid [-h] /usr/sadm/bin/smpatch update [-d patchid] [-h]

DESCRIPTION

The smpatch command manages patches, which includes the ability to download, add, and remove patches for the local machine. You can explicitly specify the patches to add. Or, you can instruct this command to analyze the local machine to determine the list of required patches to be processed.
Dependency
You must first install the PatchPro software on the local machine before you can run the smpatch subcommands. Download the PatchPro packages from http://www.sun.com/PatchPro. Fol- low the instructions to install the software on your machine.
Subcommands
The following subcommands are supported: add Installs patches on the local machine. You must specify the list of patches to install. In this case, the list of patches is specified by either a subcom- mand argument or defined in a text file. If any of the specified patches and the patches on which they depend on are missing from the effective patch directory, the smpatch command terminates. The process of installing the patches occurs immediately after the availability of the patches has been confirmed. analyze Analyzes the local machine to display the list of patches that it requires. The local machine is analyzed to derive the list of required patches. download Downloads patches to a local machine. You can option- ally specify the list of patches to download. In this case, the list of patches is specified by either a subcommand argument or defined in a text file. This subcommand allows you to instruct smpatch to analyze the local machine to determine the list of required patches to download. remove Removes a patch installed on the local machine. You are required to specify the patch to be removed. update Updates the local host machine by installing patches that it requires. This subcommand instructs smpatch to recommend a list of required patches by analyzing the local machine. Patches from this list are downloaded from SunSolve. The process of installing these patches occurs after the availability of the patches has been confirmed.

OPTIONS

add Either the -i or -x subcommand arguments must be used to identify patch(es) that are to be installed. The patch(es) may depend on other patches that are not explicity specified with the -i or -x arguments. The required patches must be present in the directory where the patches to be installed are located. Refer to the -d argument. If they are not available, the smpatch command terminates. If the patch(es) that the specified patch(es) depends on are unavailable, use the services provided by the download subcommand. -d patchdir Specifies the directory where the patches are to be installed from. If you do not specify this subcommand argument, the default patch direc- tory, /var/sadm/spool, on the local machine, is assumed. The patch directory has the following syntax: /directory-path, where /directory-path is a fully-qualified directory name. -h Displays the legal options for the add subcom- mand. -i patchid Specifies the ID of the patch to install. This argument can be specified multiple times to install more than one patch. -x idlist=patchlist_file Specifies the file that contains the list of patches to install. Either the -i and -x idlist=... subcommand argu- ments are required and are mutually exclusive. Patches that could not be installed are sequestered in the patchdir/patchproSequester directory where patch- dir is the effective patch directory. Refer to the -d argument. analyze Displays a list of recommended patches for the local machine. The download and add subcommands can be used respectively to download and install the recommended patches on the local machine. -h Displays the legal options for the analyze sub- command. download Either the -i or -x subcommand arguments may be used to identify patch(es) that are to be downloaded. The patch(es) may depend on other patches that are not explicity specified with the -i or -x arguments. The initial list of patch(es) along with the patches that they depend on are downloaded from SunSolve to the effective patch directory. If no arguments are specified, this subcommand down- loads patches that are required for the local machine. -d patchdir Specifies the directory where the SunSolve patches are downloaded. This directory must have write permission and be accessible. If you do not specify this argument, the default patch directory, /var/sadm/spool, on the local machine, is assumed. -h Displays the legal options for the download sub- command. -i patchid Specifies the ID of the patch to download. This argument can be specified multiple times to download more than one patch. -x idlist=patchlist_file Specifies the file that contains the list of patches to download. Both the -i and -x idlist=... subcommand arguments are mutually exclusive and optional. remove Removes or uninstalls a patch from the local machine. -i patchid Specifies the patch that you want to remove. -h Displays the legal options for the remove sub- command. updates Updates the local machine with required patches. -d patchdir Specifies the directory where the patches are downloaded. This directory must have write per- mission and be accessible. If you do not specify this subcommand argument, the default patch directory, /var/sadm/spool, on the local machine, is assumed. After the required patches are downloaded, they are installed from the effective patch directory. -h Displays the legal options for the update sub- command. Patches that could not be installed are sequestered to the patchdir/patchproSequester directory where patch- dir is the effective patch directory refer(to the -d argument).

OPERANDS

The following operands are supported: patchlist_file Specifies the fully-qualified path and file name of the file containing the list of patches that you want to download or install. The patchlist_file file con- tains one patch ID per line.

EXAMPLES

Example 1: Installing Specified Patches
The following example shows how to install patches 102893- 01, 106895-09, and 106527-05 on the local machine. The patches are located in the /files/patches/s9 directory. /usr/sadm/bin/smpatch add \ -i 102893-01 -i 106895-09 -i 106527-05 \ -d /files/patches/s9
Example 2: Installing Patches Using a Patch List File
The following example specifies the /tmp/patch/patch_file to install patches on the local machine. The patches are located in the NFS-mounted directory, /net/fileserver/export/patchspool/Solaris9: /usr/sadm/bin/smpatch add \ -x idlist=/tmp/patch/patch_file \ -d /net/fileserver/export/patchspool/Solaris9
Example 3: Installing Patches Using a Patch List File and the Default Patch Source Directory
The following example shows how to install the patches listed in /tmp/patch/patch_file on the local machine. The patches are located in the default patch directory, /var/sadm/spool. /usr/sadm/bin/smpatch add -x idlist=/tmp/patch/patch_file
Example 4: Downloading Specified Patches
The following example shows how to download the 102893-01 and 106895-09 patches from Sunsolve to the /files/patches/download/s8 directory on the local machine. Any uninstalled patches that the specified patches depend on will also be downloaded. /usr/sadm/bin/smpatch download -i 102893-01 -i 106895-09 \ -d /files/patches/download/s8
Example 5: Downloading Recommended Patches
The following example shows how to download the recommended patches for the local machine. The local machine is analyzed to assess which patches are needed. The list of patches derived from the assessment process are downloaded from Sun- Solve and stored in the /files/patches/download/s8 direc- tory. Please note that if the download directory was not specified, then the download directory would be /var/sadm/spool. /usr/sadm/bin/smpatch download -d /files/patches/download/s8
Example 6: Removing Specified Patches
The following example shows how to remove patch 102893-01 from the local machine. /usr/sadm/bin/smpatch remove -i 10283-01
Example 7: Installing Patches Required by the Local Machine
The following example shows how to install required patches on the local machine. /usr/sadm/bin/smpatch update

ENVIRONMENT VARIABLES

See environ(5) for descriptions of the following environment variables that affect the execution of smpatch: JAVA_HOME. If this environment variable is not specified, the /usr/java" location is used. See smc(1M).

EXIT STATUS

The following exit values are returned: 0 Successful completion. 1 Invalid command syntax. A usage message displays. 2 An error occurred while executing the command. An error message displays.

ATTRIBUTES

See attributes(5) for descriptions of the following attri- butes: ____________________________________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |_____________________________|_____________________________| | Availability | SUNWpmgr | |_____________________________|_____________________________|

SEE ALSO

arch(1), uname(1), patchadd(1M), patchrm(1M), share(1M), smc(1M), attributes(5), environ(5)