Go to main content

Managing Devices in Oracle® Solaris 11.4

Exit Print View

Updated: November 2020
 
 

How to Test an RCM Script

  1. Set environment variables, such as RCM_ENV_FORCE, in the command-line shell before running your script.

    For example, in the Korn shell, you set environment variables as follows:

    $ export RCM_ENV_FORCE=TRUE
  2. Test the script by running the script commands manually from the command line.

    For example:

    $ script-name scriptinfo
    $ script-name register
    $ script-name preremove resource-name
    $ script-name postremove resource-name
  3. Make sure that each RCM script command in your script prints appropriate output to stdout.
  4. Install the script in the appropriate script directory.

    For more information, see How to Install an RCM Script.

  5. Test the script by initiating a dynamic remove operation.

    Caution  -  Make sure that you are familiar with these commands because they can alter the state of the system and cause system failures.


    For example, if your script registers the device /dev/dsk/c1t0d0s0, you might try the following commands:

    $ cfgadm -c unconfigure c1::dsk/c1t0d0
    $ cfgadm -f -c unconfigure c1::dsk/c1t0d0
    $ cfgadm -c configure c1::dsk/c1t0d0