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


Enabling an Op Script and Defining a Script Alias

After you write an op script, you must save it the /var/db/scripts/op directory on the routing platform. Op scripts in the /var/db/scripts/op directory are ignored if they are not enabled. Only users in the superuser JUNOS login class can access and edit files in the /var/db/scripts/op directory.

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 directory 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.

To enable an op script, include the file statement at the [edit system scripts op] hierarchy level, specifying the name of an Extensible Stylesheet Language Transformations (XSLT) file containing an op script.

The optional command statement allows you to specify an alias for the filename of the script. Thus, you can run the script by invoking either the filename (with or without the .xsl extension) or the filename alias.

[edit system scripts op]
file filename.xsl {
    command filename-alias;
)

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