[Contents] [Prev] [Next] [Index] [Report an Error]


Enabling a Commit Script and Making the Script Optional

Commit scripts in the /var/db/scripts/commit directory are ignored if they are not enabled. To enable a commit script, include the file statement at the [edit system scripts commit] hierarchy level, specifying the name of an Extensible Stylesheet Language Transformations (XSLT) file containing a commit script.

The optional optional statement allows a commit operation to succeed even if the script is missing from the /var/db/scripts/commit directory on the routing platform. The commit operation progresses as though the commit script were not enabled.

Include the optional statement if, for example, you anticipate the need to quickly remove a script from operation by simply deleting it from the /var/db/scripts/commit directory without deleting the file filename.xsl statement from the configuration. You can then quickly place the commit script back into operation by adding it to the /var/db/scripts/commit directory again, without changing the configuration.

[edit system scripts commit]
file filename.xsl {
    optional;
}

After you enable a commit script and issue a commit command, the commit script takes effect immediately.

CAUTION: If the script you enabled is missing from the /var/db/scripts/commit directory, you might not discover its absence quickly because the optional statement allows the commit operation to proceed normally. No error message alerts you that the enabled script was not found.



[Contents] [Prev] [Next] [Index] [Report an Error]