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

Using Commit Scripts

To use commit scripts, follow these steps:

  1. Write a commit script.

    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.

  2. Copy the script to the /var/db/scripts/commit directory on the hard drive or the /config/scripts/commit directory on the CompactFlash drive, depending on which memory location you wish to use. Only users in the superuser JUNOS login class can access and edit files in the /var/db/scripts/commit or /config/scripts/commit directories.

    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/commit or /config/scripts/commit directories on each Routing Engine.

    Note: The commit synchronize command does not automatically copy the scripts from one Routing Engine directory into the other Routing Engine directory.

  3. Enable the script by including the file statement at the [edit system scripts commit] hierarchy level. Only users in the superuser class can configure commit scripts.
    [edit system scripts commit]
    file filename;
  4. Issue the commit command.

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.


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