Symantec logo

Example: Using VCSAgStartup() and script entry points on UNIX

The following example shows how to build the FileOnOff agent using your own VCSAgStartup entry point. This example implements the VCSAgStartup, online, offline, and monitor entry points only.

 Example: implementing agent using VCSAgStartup and script entry points

  1. Create the following directory:

  1. Copy the contents from the sample agent directory to the directory you created in the previous step:
  2. Change to the new directory:
  3. Edit the file agent.C and modify the VCSAgStartup() function (the last several lines) to match the following example:

void VCSAgStartup() {

VCSAgInitEntryPointStruct(V50);

// Do not configure any entry points because

// this example does not implement any of them

// using C++.

VCSAgSetLogCategory(10041);

}

  1. Compile agent.C and build the agent by invoking make. (Makefile is provided.)

    make

  2. Create a directory for the agent:
  3. Install the FileOnOff agent built in step 5.

make install AGENT=FileOnOff

  1. Implement the online, offline, and monitor entry points, as instructed in step 3 on page 135.