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

Adding and Removing Commit Scripts from the Configuration

Commit scripts are physically located in the /config/scripts/commit or the /var/db/scripts/commit directories. They are ignored if they are not added to the configuration. However, the system does not recognize these scripts unless the commit script’s filename is at the [edit system scripts commit] hierarchy level. To remove a commit script from the configuration, remove the commit script’s filename from the [edit system scripts commit] hierarchy level.

Commit Scripts listed at the [edit system scripts commit] hierarchy can include the optional statement. The optional statement, makes the listed commit script optional to the commit process. Adding this statement to the commit script allows a commit operation to succeed even if the script is missing from the commit script directory on the routing platform. For example, you can include the optional statement if you anticipate the need to quickly remove a script from operation by simply deleting it from the commit script directory and you do not want to remove the commit script from the [edit system scripts commit] hierarchy. Later you can replace the file in the commit script directory, and the commit script will once again be active on the router.

Commit scripts can also be deactivated and reactivated as needed. When deactivated, the commit script is listed in the configuration as inactive and ignored during the commit process. Later, when reactivated, the commit script is added back into the commit process.

When written in SLAX, a commit script's filename must include the .slax extension. If the commit script does not include the .slax file extension, the script is not executed. When written in XSLT, a commit script does not require a file extension. However, we strongly recommend that you include the optional .xsl extension to the filename.

Caution: If the script you enabled is missing from the commit script directory, you might not discover its absence, since the optional statement allows the commit operation to proceed normally when a file is missing. No error message alerts you that the enabled script is not found.


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