Writing New Device-Clean Scripts
If you add more allocatable devices to the system, you might need to create your own device-clean scripts. The deallocate command passes a parameter to the device-clean scripts. The parameter, which is shown here, is a string that contains the device name. For more information, see the device_allocate(5) man page.
clean-script -[I|i|f|S] device-name
Device-clean scripts must return "0" for success and greater than "0" for failure. The options -I, -f, and -S determine the running mode of the script:
-
-I -
Needed during system boot only. All output must go to the system console. Failure or inability to forcibly eject the media must put the device in the allocate error state.
-
-i -
Similar to the
-Ioption, except that output is suppressed. -
-f -
For forced cleanup. The option is interactive and assumes that the user is available to respond to prompts. A script with this option must attempt to complete the cleanup if one part of the cleanup fails.
-
-S -
Standard cleanup. The option is interactive and assumes that the user is available to respond to prompts.