Previous

Invoking Task Objects

Once your task object is written (and tested) you need to make it available for use. If your script is intended just for your personal use, you can include it in your .dcecprc file and invoke it as described in Informal Administration Scripts.

Formal task objects require a few steps to make them behave like other dcecp objects.

1. Log in as root and copy the finished script into the dcelocal/dcecp directory and set the file permissions to executable.

2. Start the dcecp program and run the auto_mkindex utility. This creates information that informs the DCE control program about all available objects. With root privileges, run the following command in the directory where the task objects reside. On UNIX systems, this is often the dcelocal/dcecp directory.

% dcecp

dcecp> auto_mkindex /opt/dcelocal/dcecp *.dcp

dcecp>

3. To include the new task object name in the dcecp help screen, edit the file /opt/dcelocal/dcecp/help.dcp. This file is displayed in response to the dcecp help operation.

You need to make this file available on each DCE host where the script will be executed. Generally this means copying the file to each host's /opt/dcelocal/dcecp directory and then running the auto_mkindex utility on the files in the directory. You might want to place the object name in the /opt/dcelocal/dcecp/help.dcp file as well.

As a convenience, you could write a script that uses the DCE control program's hostdata object to create the file on each host. The script could then run auto_mkindex utility using the hostdata object's postprocessor attribute. Managing DCE Host Services and Host Data contains information on using the dcecp hostdata object.