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

Installing Op Scripts to a Router

To install op scripts to a router, follow these steps:

  1. Write an op script.

    For information on writing op scripts, see Introduction to Writing Automation Scripts. For examples of op scripts, see Automation Script Examples.

  2. Copy the script to the /var/db/scripts/op directory on the hard drive or the /config/scripts/op on the flash drive, depending on which memory location is used. Only users in the superuser JUNOS login class can access and edit files in the /var/db/scripts/op or config/scripts/op directories.

    Note: 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/op or config/scripts/op directories on each Routing Engine. The commit synchronize command does not automatically copy the scripts from one Routing Engine directory into the other Routing Engine directory.

  3. Add the script to the [edit system scripts op] hierarchy level using the file statement. Only users in the superuser class can configure op scripts.
    [edit system scripts op]
    file filename;
  4. Issue the commit command.

    Once the configuration is committed, the op script will be available on the router. It can be executed using the op command.


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