This article provides a configuration example of event option to trigger a slax script using the event script feature of the Junos.
This is useful while applying a workaround or troubleshooting to change a value in the config automatically after the reboot of the device.
set event-options policy test events PIC set event-options policy test attributes-match PIC.message matches "FPC PFE resync_done fpc 0" <-- message to match when FPC comes up after a reboot set event-options policy test then event-script test.slax set event-options event-script file test.slax
Copy the script below in the /var/db/script/event folder with name test.slax
test.slax
labroot@jtac-qfx5120-32c-r2005> start shell % cd /var/db/scripts/event/ % ls test.slax %
More information, refer to Example: Changing the Configuration Using SLAX and XSLT Op Script