Symantec logo

Example script entry points for the FileOnOff resource

The following example shows entry points written in a shell script.


  Note   The actual Veritas Cluster Server FileOnOff entry points are written in C++, but for this example, shell script is used.


Online entry point for FileOnOff

The FileOnOff example entry point is simple. When the agent's online entry point is called by the agent, the entry point expects the name of the resource as the first argument, followed by the values of the remaining ArgList attributes.

In this example of an agent earlier than V50, the value of PathName attribute is the second argument. The agent creates the file test in the specified path.

Monitor entry point for FileOnOff

When the agent's monitor entry point is called by the agent, the entry point expects the name of the resource as the first argument, followed by the values of the remaining ArgList attributes.

If the file exists it returns exit code 110, indicating the resource is online. If the file does not exist the monitor returns 100, indicating the resource is offline. If the state of the file cannot be determined, the monitor returns 99.

Offline entry point for FileOnOff

When the agent's offline entry point is called by the agent, the entry point expects the name of the resource as the first argument, followed by the values of the remaining ArgList attributes.