Enabling an Op Script and Defining a Script Alias
Operation (op) scripts are stored on a device’s hard drive
in the /var/db/scripts/op directory
or on the flash drive in the /config/scripts/op directory. Only users in the Junos OS super-user login
class can access and edit files in these directories. For information
about setting the storage location for scripts, see Storing Op Scripts in Flash Memory.
![]() | Note:
If the device has dual Routing Engines and you want to
enable an op script to execute on both Routing Engines, you must copy
the script to the |
You must enable an op script before it can be executed. Include the file filename statement at the [edit system scripts op] hierarchy level, specifying the name of an XSLT or SLAX file containing an op script. Only users who belong to the Junos super-user login class can enable op scripts.
The filename of an op script written in SLAX must include the .slax extension for the script to be enabled and executed. No particular filename extension is required for op scripts written in XSLT, but we strongly recommend that you append the .xsl extension.
To determine which op scripts are currently active on the device,
either list the contents of the /var/run/scripts/op directory or use the show command to display the files
included at the [edit system scripts op] hierarchy level.
Optionally, you can define an alias for an op script and then specify either the filename or the alias when you execute the script. To define the alias, include the command statement at the [edit system scripts op file filename] hierarchy level:
Hide Navigation Pane
Show Navigation Pane
Download
SHA1
