Previous  |  Next  >  
Product: Cluster Server Guides   
Manual: Cluster Server 4.1 Agent Developer's Guide   

Implementing Entry Points Using Scripts

As mentioned in previously, the VCSAgStartup entry point must be implemented using C++. Other entry points may be implemented using C++ or scripts. If no other entry points are implemented in C++, implementing VCSAgStartup is not required. Instead, developers may use ScriptAgent. See Using Script Entry Points for an example.

Script entry points can be executables or scripts, such as shell or Perl (VCS includes a Perl distribution). Also, the PATH environment variable must include the directory where sh is installed.

Adhere to the following rules when implementing a script entry point:

    Checkmark  In the VCSAgStartup entry point, set the corresponding field of VCSAgV40EntryPointStruct to NULL prior to calling VCSAgRegisterEPStruct(). (If necessary, review Agent Entry Points.)

    Checkmark  Place the script file in the correct directory after verifying the name of the script file.

    • Verify that the name of the script file is the same as the entry point.
    • Place the file in the directory $VCS_HOME/bin/resource_type. For example, if the online entry point for Oracle is implemented using Perl, the online script must be:
      • $VCS_HOME/bin/Oracle/online

The input parameters of script entry points are passed as command-line arguments. The first command-line argument for all the entry points is the name of the resource (except shutdown, which has no arguments).

Some entry points have an output parameter that is returned through the program exit value. Some entry points return their output in the arguments passed to them, for example, info and action.

 ^ Return to Top Previous  |  Next  >  
Product: Cluster Server Guides  
Manual: Cluster Server 4.1 Agent Developer's Guide  
VERITAS Software Corporation
www.veritas.com