Set environment variables, such as RCM_ENV_FORCE, in the command-line shell before running your script.
For example, in the Korn shell, use the following:
$ export RCM_ENV_FORCE=TRUE
Test the script by running the script commands manually from the command line.
$ script-name scriptinfo $ script-name register $ script-name preremove resource-name $ script-name postremove resource-name
Make sure each RCM script command in your script prints appropriate output to stdout.
Install the script in the appropriate script directory.
For more information, see How to Install an RCM Script.
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
Make sure that you are familiar with these commands because they can alter the state of the system and can cause system failures.