Supported Platforms
Executing an Op Script
Unlike commit scripts, operation (op) scripts do not execute during a commit operation. When you issue the commit command, op scripts configured at the [edit system scripts op] hierarchy level are placed into system memory and enabled for execution. After the commit operation completes, you can execute an op script from the CLI by issuing the op operational mode command. You also can configure the device to execute an op script automatically when a member of a specified Junos OS login class logs in to the CLI.
Executing an Op Script by Issuing the op Command
To execute an op script from the CLI, issue the op operational mode command, specifying a URL, the script filename, or the alias defined by the command statement at the [edit system scripts op file filename] hierarchy level.
Executing an Op Script at Login
You can configure an op script to execute automatically when any user belonging to a designated Junos OS login class logs in to the CLI. To associate an op script with a login class, include the login-script script-filename statement at the [edit system login class class-name] hierarchy level:
The following example configures the super-user-login.slax
op script to execute when any user who belongs to the super-user class logs in to the CLI (provided that the script has been enabled
as discussed in Enabling an Op Script and Defining a Script Alias).