By default, commit, automation, and event policy scripts are stored on the router's hard drive. However, you can save these scripts to the flash memory by including the load-scripts-from-flash statement at the [edit system scripts] hierarchy level:
- [edit system scripts]
- load-scripts-from-flash;
The load-scripts-from-flash statement applies to all commit, automation, and event policy scripts, and changes the physical location of these scripts. This statement does not affect the script's operation. Commit scripts located on the router's hard drive are accessed from the /var/db/scripts/[op|event] directory. Commit scripts located on the router's flash drive are accessed from the /config/scripts/[op|event] directory.
You can view the currently active scripts on the router in the /var/run/scripts/op and /var/run/scripts/event directories. These directories allow you to view the active scripts without having to search for this information within the current configuration.
![]() |
Note: When you switch from storing the files on the hard drive to storing files on the flash drive, or you switch from storing the files on the flash drive to storing files on the hard drive, you must manually move any scripts residing in the former memory location to the new memory location. If you do not do this, the scripts will not be available to the router. |