Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Enabling an Event Script

Event scripts are stored on a device’s hard drive in the /var/db/scripts/event directory or on the flash drive in the /config/scripts/event 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 Scripts in Flash Memory.

Note: If the device has dual Routing Engines and you want to enable an event script to execute on both Routing Engines, you must copy the script to the /var/db/scripts/event or /config/scripts/event directory on both Routing Engines. The commit synchronize command does not automatically copy scripts between Routing Engines.

You must enable an event op script before it can be executed. Include the file filename statement at the [edit event-options events-script] hierarchy level, specifying the name of an Extensible Stylesheet Language Transformations (XSLT) or Stylesheet Language Alternative Syntax (SLAX) file containing an event script. Only users who belong to the Junos super-user login class can enable event scripts.

The filename of an event script written in SLAX must include the .slax extension for the script to be enabled and executed. No particular filename extension is required for event scripts written in XSLT, but we strongly recommend that you append the .xsl extension.

To determine which event scripts are currently enabled on the device, use the show command to display the files included at the [edit event-options event-script] hierarchy level. To ensure that the enabled files are on the device, list the contents of the /var/run/scripts/event/ directory using the file list /var/run/scripts/event operational mode command.

Published: 2013-03-05

Published: 2013-03-05