Previous Table of Contents Next


Patch Numbering

Patches are identified by unique alphanumeric strings with the patch base code first, a hyphen, and a number that represents the patch revision number. For example, patch 101977-02 is a Solaris 2.4 patch to correct the lockd daemon. 101988 is the number for the lock daemon patch. “-02” indicates that this is the second release of the patch.

Installing a Patch

When you install a patch, the patchadd command copies files from the patch directory to a local system disk. The patchadd command does the following:

  Determines the Solaris version number of the managing host and the target host.
  Updates the pkginfo file of the patch package with information about patches that are rendered obsolete by the patch being installed, other patches required by this patch, and patches that are incompatible with this patch.

During patch installation, the patchadd command keeps a log of the patch installation in /var/sadm/patch/patch-number/log for the Solaris 2.4 and earlier operating environments. The Solaris 2.5 and 2.6 releases also store log files in this location, but only in the event of installation errors.

The patchadd command does not install a patch under the following conditions:

  The package is not fully installed on the host.
  The patch architecture differs from the system architecture.
  The patch version does not match the installed package version.
  A patch is already installed with the same base code and a higher version number.
  The patch is incompatible with another, already installed patch. (This information is stored in the pkginfo file for each patch.)
  The patch being installed requires another patch that is not installed.

The following example installs a patch to a standalone system:

# patchadd /var/spool/patch/104945-02

The following example installs a patch to a client system, client1, from the server's console:

# patchadd -R /export/root/client1 /var/spool/patch/104945-02

The following example installs a patch to a service from the server's console:

# patchadd -S Solaris_2.3 /var/spool/patch/104945-02

The following example installs multiple patches in a single patchadd invocation:

# patchadd -M /var/spool/patch 104945-02 104946-02 102345-02

The following example installs multiple patches, specifying a file that contains the list of patches to install:

# patchadd -M /var/spool/patch patchlist

The following example installs multiple patches to a client and saves the backout data to a directory other than the default:

# patchadd -M /var/spool/patch -R /export/root/client1
 -B/export/backoutrepository 104945-02 104946-02 102345-02

The following example installs a patch to a Solaris 2.6 or later Net Install Image:

# patchadd -C /export/Solaris_2.6/Tools/Boot /var/spool/patch/104945-02

The following example installs a patch to a Solaris 2.6 or later Net Install Image, but instructs the patchadd command not to save copies of files that are updated or replaced:

# patchadd -d /export/Solaris_2.6/Tools/Boot /var/spool/patch/104945-02


CAUTION! Never use the -d option because it makes it difficult to remove or back out patches that become obsolete.

Removing Patches

When you remove, or back out, a patch, the patchrm command restores all files modified by that patch, unless any of the following are true:

  The patch was installed with patchadd -d, which instructs patchadd not to save copies of files that are updated or replaced.
  The patch has been obsoleted by a later patch.
  The patch is required by another patch.

The patchrm command calls pkgadd to restore packages that were saved from the initial patch installation.

During the patch installation, patchrm keeps a log of the patch installation in /tmp/backoutlog.pid. This log is removed if the patch backs out successfully.

The following example removes a patch from a standalone system:

# patchrm 104945-02

The following example removes a patch from a client's system from the server's console:

# patchrm -R /export/root/client1 104945-2

The following example removes a patch from a server's service area:

# patchrm -S Solaris_2.3 104945-02

The following example removes a patch from a Net Install Image:

# patchrm -C /export/Solaris_2.6/Tools/Boot 104945-02


Previous Table of Contents Next