smpatch - download, apply, and remove updates
/usr/sbin/smpatch add -i update-id [auth-opts] [-i update-id] ... [-d update-dir] [-b BE_name] [-n system-name] ... [-x mlist=system-list-file] [-V]
/usr/sbin/smpatch add -x idlist=update-list-file [auth-opts] [-d update-dir] [-n system-name] ... [-b BE_name] [-x mlist=system-list-file] [-V]
/usr/sbin/smpatch analyze [auth-opts] [-i update-id] ... [-n system-name] ... [-x idlist=update-list-file] [-V]
/usr/sbin/smpatch download [auth-opts] [-i update-id] ... [-d update-dir] [-f] [-n system-name] ... [-t] [-x idlist=update-list-file] [-V]
/usr/sbin/smpatch get [auth-opts] [-n system-name] ... [parameter-name]... [-V]
/usr/sbin/smpatch messages [-a] [-V]
/usr/sbin/smpatch order -i update-id [auth-opts] [-i update-id] ... [-d update-dir] [-n system-name] ... [-V]
/usr/sbin/smpatch order -x idlist=update-list-file [auth-opts] [-d update-dir] [-n system-name] ... [-V]
/usr/sbin/smpatch remove -i update-id [auth-opts] [-n system-name] ... [-b BE_name] [-V]
/usr/sbin/smpatch set [auth-opts] [-n system-name] ... parameter-name=parameter-value... [-V]
/usr/sbin/smpatch unset [auth-opts] [-n system-name] ... parameter-name... [-V]
/usr/sbin/smpatch update [auth-opts] [-i update-id] ... [-d update-dir] [-n system-name] ... [-b BE_name] [-x idlist=update-list-file] [-V]
The smpatch command manages the update process on a single system or on multiple systems. Use this command to download, apply, and remove updates. Also, use the smpatch command to configure the update management environment for your system.
If you want to run the smpatch command in remote mode, your system must run at least the Developer Solaris Software Group of the Solaris 10 system.
The smpatch analyze command determines the updates that are appropriate for the systems you want to update. The smpatch command can download and apply updates that you specify on the command line. Or, smpatch can download and apply updates based on an analysis of one or more systems. Use the -i option or the -x idlist= option to specify the particular updates.
All of the systems on which you want to apply updates must be running the same version of the Solaris Operating System, have the same hardware architecture, and have the same updates applied.
The list of updates that is generated by the analysis is based on all of the available updates from the Sun update server. No explicit information about your host system or its network configuration is transmitted to Sun. Only a request for the Sun update set is transmitted. The update set is scanned for updates that are appropriate for this host system, the results are displayed, and those updates are optionally downloaded.
smpatch supports the Live Upgrade feature of the Solaris operating system (see live_upgrade(5)). Through the add, remove, and update subcommands, described below, smpatch enables you to perform operations on a boot environment (BE). A BE is an operating system image, consisting of a particular set of operating system and application software packages.
The smpatch command supports the following subcommands:
add
This subcommand attempts to apply only the updates you specify. If you specify an update that depends on another that has not been applied, the add command fails to apply the update you specified.
This subcommand does not apply updates based on the specified update policy. To apply updates based on the update policy, use the update subcommand.
Use the -i or -x idlist= option to specify the updates to apply. Note that all of the updates you specify, and those on which they depend, must exist in the download directory.
Use the -n or the -x mlist= option to specify the systems on which to apply updates.
Optionally use the -d option to specify an alternate download directory.
If the updates on which the specified updates depend are unavailable, run the smpatch download subcommand to obtain the updates you need.
When you use the -b BE_name option, the add subcommand applies a specified update to the BE BE_name, rather than to the currently running operating system. Upon successful installation of the update, smpatch activates BE_name (see luactivate(1M)) and informs you that you can, at that point, boot from BE_name.
analyze
After analyzing the system, use the update subcommand or the download and add subcommands to download and apply the updates to your systems.
The list of updates is written to standard output, so you can redirect standard output to a file to create an update list.
If you supply a list of one or more updates, the list is augmented with the updates on which those updates depend. The list is also put in an order suitable for applying updates.
The smpatch analyze command depends on network services that are not available while the system is in single-user mode.
download
Use the -i or -x idlist= option to specify the updates to download.
Use the -f option to force the download of the exact update revision specified by -i update-id. If -i update-id does not specify a revision, the highest revision of the update is downloaded.
Use the -t option to download the README file for the update specified by -i update-id. If -i update-id does not specify a revision, the README file for the highest revision of the update is downloaded.
Use the -n option to analyze a remote system and to determine which updates to download. The updates, and those on which they depend, are downloaded from the Sun update server to the download directory of the system you specified.
The smpatch download command depends on network services that are not available while the system is in single-user mode.
get
To see values for all parameters, run the smpatch get command with no arguments. The output shows an entry for all configuration parameters. Each entry appears on a line by itself. Each entry includes three fields: the parameter name, the value you have assigned it, and its default value. The fields are separated by one or more tab characters.
The following values have special meaning: - means that no value is set, "" means that the value is the null string, \- means that the value is -, and \"" means that the value is "" (two double quotes).
In addition to these special values, these special characters might appear in the output: \t for a tab, \n for a newline, and \\ for a backslash.
To see values for particular parameters, run the smpatch get command with one or more parameter names. The output lists one parameter value per line in the order in which the parameter names are specified on the command line.
messages
You have new messages. To retrieve: smpatch messages [-a]
The preceding message appears at the top of any smpatch analyze/download/update reports. The -a option to the messages subcommand displays all messages. Without the -a option, only new (that is, as yet unread) messages are displayed.
The receiving of messages from the software update client is controlled by the property:
patchpro.report.motd.messages
When this property is enabled, the default condition, the client receives messages from Sun. To disable this property, enter:
# smpatch set patchpro.report.motd.messages=false
order
The list of updates is written to standard output, so you can redirect standard output to a file to create an update list.
Use the -i or -x idlist= option to specify the updates to order. Note that all of the updates you specify must exist in the download directory.
remove
Use the -i option to specify which update to remove. Do not use the -x idlist= option. Optionally, use the -n option to specify the name of a system. Do not use the -x mlist= option. By default, the update is removed from the local system.
If the update that you want to remove is required by one or more of the updates that have already been applied to the system, the update is not removed.
When you use the -b BE_name option, the remove subcommand removes a specified update from the BE BE_name, rather than from the currently running operating system.
set
unset
update
By default, standard updates and those that have rebootafter or reconfigafter properties are applied.
If an update does not meet the policy for applying updates, the update is not applied. Instead, the ID of the update is written to a file in the download directory. After the update ID is written to the file, smpatch continues to apply the other updates. Later, you can use patchadd to manually apply any updates listed in this file. The updates listed in the file are still in the download directory.
When you use the -b BE_name option, the update subcommand applies an update to the BE BE_name, rather than to the currently running operating system. Upon successful installation of the update, smpatch activates BE_name (see luactivate(1M)) and informs you that you can, at that point, boot from BE_name.
Installation instructions for updates that require special handling are included in the README file for each update.
The smpatch update command depends on network services that are not available while the system is in single-user mode.
Starting with Solaris 9, the smpatch command is available in two modes: local mode and remote mode. Local mode can be run only on the local system and can be run by users who have the appropriate authorizations. This mode can be run while the system is in single-user mode. Remote mode can be used to perform tasks on remote systems and can be run by users or roles that have the appropriate authorizations.
By default, local mode is run. In local mode, the Solaris WBEM services are not used, and none of the authentication options or those options that refer to remote systems are available. The command in local mode runs faster than in remote mode.
If the Solaris WBEM services are running and you specify any of the remote or authentication options, the command in remote mode is used.
On Solaris 8 systems, the smpatch command only supports local mode operations.
Your system must specify the source of updates to use. By default, you obtain updates from the Sun update server. However, you can also obtain updates from an update server on your intranet or from a local collection of updates on your system.
You must specify the URL that points to the collection of updates. By default, the Sun update server is the source of updates. The URL is:
https://getupdates.sun.com/solaris/
The URL must point to an update server or to a collection of updates that is available to the local system. The value of this URL cannot be null.
You can use the smpatch set command to configure the update management environment for your system. Use these parameters:
patchpro.patchset
patchpro.download.directory
patchpro.backout.directory
patchpro.patch.source
patchpro.proxy.host
patchpro.proxy.port
patchpro.proxy.user
patchpro.proxy.passwd
patchpro.install.types
This policy only affects which updates are installed on your system. The policy does not affect which updates are downloaded.
By default, updates that have the standard, rebootafter, and reconfigafter properties can be applied. See ``Setting an Update Policy.''
Updates are classified as being standard or nonstandard. A standard update can be applied by smpatch update. Such an update is associated with the standard update property. smpatch applies standard updates immediately. These updates require no system restart. A nonstandard update has one of the following characteristics:
Use smpatch set to specify the types of updates that smpatch can additionally apply during an update operation. Such updates might include those that require a reboot and those that must be applied while the system is in single-user mode.
This policy only affects which updates are installed on your system. The policy does not affect which updates are downloaded.
Specify the types of updates that can be applied by using the following command:
# smpatch set patchpro.install.types=update-property-list
update-property-list is a colon-separated list of one or more of the following update properties:
interactive
rebootafter
rebootimmediate
reconfigafter
reconfigimmediate
singleuser
standard
The smpatch command supports two kinds of options: authentication options and subcommand options.
The smpatch authentication options, auth-opts, apply to all of the subcommands.
If no authentication options are specified, certain defaults are assumed and the user might be prompted for additional information, such as a password for authentication purposes.
These authentication options are only available if the Solaris Management Console and the Solaris WBEM services are available on the local system. If the WBEM services are not running on the local system, smpatch performs update operations on the local system only. You can also ``force'' the use of the local-mode smpatch command by using the -L option.
The single letter options can also be specified by their equivalent option words preceded by two hyphens. For example, you can specify either -l or --rolepassword.
The following authentication options are supported:
-H | --hostname host-name:port
-L
This option is mutually exclusive with the other authentication options.
-l | --rolepassword role-password
-p | --password password
-r | --rolename role-name
-u | --username user-name
The following options pertain to the smpatch subcommands:
-b BE_name
-d update-dir
The default download directory is /var/sadm/spool.
The directory must be writable by root and be publicly readable.
update-dir uses one of the following forms:
-f
This option is supported by the download subcommand.
-h
-i update-id
You can specify more than one update ID by using the -i option for each update. You can also use the -x idlist= option to point to a list of update IDs.
When using the remove subcommand, you can specify exactly one update ID.
This option is supported by the add, analyze, download, order, remove, and update subcommands.
-n system-name
When using the add subcommand, you can specify more than one system by using the -n option for each system. When using the analyze, download, remove, and update subcommands, you can only specify a single system.
To specify more than one system for the smpatch add command, use the -x mlist= option. This option enables you to specify a list of systems instead of using the -n option to specify each system. The -n option and the -x mlist= option are mutually exclusive.
If you do not specify this option, the system is assumed to be the one specified by the -H option.
This option is supported only if the Solaris Management Console and the Solaris WBEM services are running on the local system and any system that is specified by this option.
This option is supported by the add, analyze, download, get, order, remove, set, unset, and update subcommands.
-t
This option is supported by the download subcommand.
-V
-x idlist=update-list-file
Each update ID in the file must be terminated by a newline character. The file name you specify must be a full path name.
You can use the -i option to specify a list of update IDs.
This option is supported by the add, analyze, download, order, and update subcommands.
-x mlist=system-list-file
Each system name must be terminated by a newline character. The file name you specify must be a full path name.
You can use the -n option to specify a list of systems instead of using the -x mlist= option. The -n option and the -x mlist= option are mutually exclusive.
This option is supported only if the Solaris Management Console and the Solaris WBEM services are running on the local system and any system that is specified in system-list-file.
This option is supported by the add subcommand.
Example 1 Analyzing Your System to Obtain the List of Appropriate Updates for the Local System
# smpatch analyze
Shows how to analyze your system to obtain the list of appropriate updates. After the analysis, you can download and apply the updates to your system.
Example 2 Analyzing Your System to Obtain the List of Appropriate Updates for Another System
# smpatch analyze -n lab1
Shows how to analyze a different system, lab1, to obtain the list of appropriate updates. After the analysis, you can download and apply the updates to that system.
Example 3 Applying Updates to Multiple Systems
# smpatch add -i 102893-01 -i 106895-09 -i 106527-05 \ -d fileserver:/files/updates/s10 -n lab1 -n lab2
Applies updates 102893-01, 106895-09, and 106527-05 to the systems lab1 and lab2. The updates are located in the /files/updates/s10 directory on the system named fileserver.
Example 4 Applying Updates by Using an Update List File
# smpatch add -x idlist=/tmp/update/update_file \ -d /net/fileserver/export/updatespool/Solaris10 -n lab1 -n lab2
Applies the updates specified in the file /tmp/update/update_file to the systems lab1 and lab2. The updates are located in the NFS-mounted directory named /net/fileserver/export/updatespool/Solaris10.
Example 5 Applying Updates by Using an Update List File and a System List File
# smpatch add -x idlist=/tmp/update/update_file \ -x mlist=/tmp/update/sys_file
Applies the updates listed in the file /tmp/update/update_file to the systems listed in the file /tmp/update/sys_file. The updates are located in the default /var/sadm/spool directory on the local system.
Example 6 Analyzing a System and Downloading Updates From the Sun Update Server
# smpatch download -n lab1
Analyzes the lab1 system and downloads the appropriate updates from the Sun update server to the download directory.
Example 7 Downloading Updates From the Sun Update Server
The command below downloads the 102893-01 and 106895-09 updates from the Sun update server to the /files/updates/s10 directory.
# smpatch download -i 102893-01 -i 106895-09 -d /files/updates/s10
Example 8 Downloading Specific Update Revisions From the Sun Update Server
The command below downloads the 102893-01 and 106895-02 updates from the Sun update server. The specific revisions are downloaded, not the highest available revision.
# smpatch download -f -i 102893-01 -i 106895-02
Example 9 Downloading the Highest Available Update Revisions From the Sun Update Server
The command below downloads the 102893-01 and 106895-09 updates, which are the highest available revisions, from the Sun update server.
# smpatch download -f -i 102893 -i 106895
Example 10 Downloading Update README Files From the Sun Update Server
The command below downloads the README files for updates 102893-01 and 106895-02. Because update 102893 was specifi ed without a revision number, the README file for the highest available update revision, 102893-01, is downloaded from the Sun update server.
# smpatch download -t -i 102893 -i 106895-02
Example 11 Listing All Configuration Parameter Values
# smpatch get -p password Loading Tool: com.sun.admin.patchmgr.cli.PatchMgrCli from mars Login to mars as user root was successful. Download of com.sun.admin.patchmgr.cli.PatchMgrCli from mars was successful. On machine mars: patchpro.backout.directory - "" patchpro.download.directory - /var/sadm/spool patchpro.install.types - rebootafter:reconfigafter:standard patchpro.patch.source - https://getupdates.sun.com/solaris/ patchpro.patchset - current patchpro.proxy.host - "" patchpro.proxy.passwd **** **** patchpro.proxy.port - 8080 patchpro.proxy.user - "" patchpro.sun.passwd **** **** patchpro.sun.user - ""
Lists the configuration settings for the system.
Example 12 Listing One or More Configuration Parameter Values
# smpatch get -L patchpro.patch.source patchpro.download.directory https://getupdates.sun.com/solaris/ /var/sadm/spool
Uses smpatch in local mode to list the values of the patchpro.patch.source and the patchpro.download.directory parameters.
Example 13 Reordering a List of Updates
# smpatch order -x idlist=/tmp/plist
Reorders the update list called /tmp/plist in an order that is suitable for applying the updates.
Example 14 Removing an Update
# smpatch remove -i 102893-01
Removes update 102893-01.
Example 15 Specifying the Update Policy
The following command specifies the update policy.
# smpatch set \ patchpro.install.types=standard:singleuser:reconfigafter:rebootafter
Specifies the update policy for your system. The following types of updates are allowed to be applied to your system:
Example 16 Changing the Download Directory Location
# smpatch set patchpro.download.directory=/export/home/updates
Example 17 Specifying a Local Web Proxy
# smpatch set patchpro.proxy.host=webaccess.corp.net.com \ patchpro.proxy.port=8080
Specifies the host name, webaccess.corp.net.com, and port, 8080, of the local web proxy.
Example 18 Resetting a Configuration Parameter Value
# smpatch unset patchpro.patch.source
Resets the value of the patchpro.patch.source parameter to its default value, which is the URL that points to the Sun update server.
Example 19 Updating Your System
# smpatch update -L
Analyzes your local system, determines the appropriate updates, downloads those updates to the download directory, and applies those updates.
Example 20 Adding an Update to a BE
The following command adds a specific update to the BE altboot.
# smpatch add -b altboot 111111-01
Following successful completion of this command, you can then boot from altboot.
Example 21 Updating a BE
The following command performs an update on the BE altboot.
# smpatch update -b altboot
This command performs all of the usual analysis and dependency checking that occurs with any update command. Following successful completion of this command, you can then boot from altboot.
Example 22 Obtaining smpatch Version Number
The following command returns the version number for an smpatch subcommand.
# smpatch update -V 1.0.9
See environ(5) for a description of the JAVA_HOME environment variable, which affects the execution of the smpatch command. The default value of this variable is /usr/java. See the smc(1M) man page.
The following exit values are returned:
0
1
2
See the attributes(5) man page for descriptions of the following attributes:
|
boot(1M), luactivate(1M), patchadd(1M), patchrm(1M), smc(1M), attributes(5), environ(5), live_upgrade(5)
Sun Update Manager 1.0 Administration Guide
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |