Enabling a Commit Script and Making the Script Optional
Commit scripts in the
/var/db/scripts/commitdirectory are ignored if they are not enabled. To enable a commit script, include thefilestatement 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
optionalstatement allows a commit operation to succeed even if the script is missing from the/var/db/scripts/commitdirectory on the routing platform. The commit operation progresses as though the commit script were not enabled.Include the
optionalstatement if, for example, you anticipate the need to quickly remove a script from operation by simply deleting it from the/var/db/scripts/commitdirectory without deleting the filefilename.xslstatement from the configuration. You can then quickly place the commit script back into operation by adding it to the/var/db/scripts/commitdirectory again, without changing the configuration.[edit system scripts commit]filefilename.xsl {optional;}After you enable a commit script and issue a
commitcommand, the commit script takes effect immediately.