Solaris 8 System Administration Supplement

How to Test an RCM Script

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

    For example, in the Korn shell, use:


    $ 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 each RCM script command in your script prints appropriate output to stdout.

  4. Install the script in the appropriate script directory.

    See How to Install an RCM Script for more information.

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

    For example, assume your script registers the device, /dev/dsk/c1t0d0s0. Try these commands.


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

    Caution – Caution –

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