Basic Process for Using Commit Scripts
You follow this process to use commit scripts:
This manual provides procedural steps and examples for writing scripts that generate error, warning, or system log messages and configuration changes. For detailed examples, see Commit Script Examples.
- Copy the script to the
/var/db/scripts/commitdirectory. Only users in the superuser JUNOS login class can access and edit files in the/var/db/scripts/commitdirectory.If a platform has dual Routing Engines and you want the script to take effect on both Routing Engines, you must copy the script to the
/var/db/scripts/commitdirectory on each Routing Engine. Thecommit synchronizecommand does not automatically copy the scripts from one Routing Engine directory into the other Routing Engine directory.
- Enable the script by including the
filestatement at the[edit system scripts commit]hierarchy level. Only users in the superuser class can configure commit scripts.[edit system scripts commit]filefilename.xsl;- Issue the
commitcommand.The JUNOS software provides several tools to manage and monitor commit script operation, including source control, traceoptions, and monitoring commands. For more information, see Configuring and Troubleshooting Commit Scripts.