Solaris 8 System Administration Supplement

RCM Script Overview

Dynamic reconfiguration of system resources enables you to reconfigure system components while the system is still running. This feature has been available with the cfgadm command since the Solaris 8 release. The Reconfiguration Coordination Manager is the framework that manages the dynamic removal of system components. By using RCM, you can register and release system resources in an orderly manner.

In the Solaris 8 4/01 release, you can use the new RCM script feature to write your own scripts to shut down your applications, or to cleanly release the devices from your applications during dynamic reconfiguration. The RCM framework launches a script automatically in response to a reconfiguration request, if the request impacts the resources that are registered by the script.

Previously, you had to release resources from applications manually before you could dynamically remove the resource. Or, you could use the cfgadm command with the -f option to force a reconfiguration operation, but this option might leave your applications in an unknown state. Also, the manual release of resources from applications commonly causes errors.

The RCM script feature simplifies and better controls the dynamic reconfiguration process. By creating an RCM script, you can:

What Is an RCM Script?

An RCM script is:

What Can an RCM Script Do?

You can use an RCM script to release a device from an application when you dynamically remove a device. If the device is currently open, the RCM script also closes the device.

For example, an RCM script for a tape backup application can inform the tape backup application to close the tape drive or shut down the tape backup application.

How Does the RCM Script Process Work?

You can invoke a script as follows:


$ script-name command [args ...]

A script performs the following basic steps:

  1. Takes the RCM command from command-line arguments.

  2. Executes the command.

  3. Writes the results to stdout as name-value pairs.

  4. Exits with the appropriate exit status.

The RCM daemon runs one instance of a script at a time. For example, if a script is running, the RCM daemon does not run the same script until the first script exits.

RCM Script Commands

You must include the following RCM commands in an RCM script:

You might include some or all of the following RCM commands:

See the rcmscript(4) man page for a complete description of these RCM commands.

RCM Script Processing Environment

When you dynamically remove a device, the RCM daemon runs: