Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

Disabling an Op Script

 

You can disable an op script by deleting or deactivating the file filename statement at the [edit system scripts op] hierarchy in the configuration. To determine which op scripts are active on the device, issue the show configuration system scripts op operational mode command. The command output lists the enabled op scripts.

To delete an op script from the configuration:

  1. From configuration mode in the CLI, enter the following command:
  2. Commit the configuration:

The file statement is removed from the configuration for the specified op script, and the op operational mode command no longer lists the op script filename as a valid completion.

To deactivate an op script in the configuration:

  1. From configuration mode in the CLI, enter the following command:
  2. Commit the configuration:

The filename of the deactivated script remains in the configuration, but it is flagged with inactive. For example:

[edit system scripts op]
user@host# show
Note

You can reactivate an op script using the activate system scripts op file filename command.

Alternatively, you can delete the script from the /var/db/scripts/op directory on a device’s hard disk or from the /config/scripts/op directory on the flash drive. Only users in the Junos OS super-user login class can access and edit files in these directories.

If you delete a script, you should also remove the file statement at the [edit system scripts op] hierarchy level in the configuration. If you delete an op script, but the file statement remains in the configuration, the CLI lists this script as a valid completion for the op command, but Junos OS issues an invalid filename error when the script is executed.

If you deactivate or delete the file statement for an op script in the configuration, you must enable the script again in order to execute it.