OSF DCE Administration Guide--Core Components

Writing Scripts and dcecp Objects
found and processed.
-no_leftovers Looks for extra options and generates an
error if one is found.
3.2.3 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 Section 3.1.
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 DCE control 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 the auto_mkindex utility
using the hostdata object’s postprocessor attribute. Chapter 9 contains information on
using the dcecp hostdata object.
124243 Tandem Computers Incorporated 3 13