beautypg.com

Script, Script < 1-5 > {< filename – Allied Telesis AlliedWare Plus Operating System Version 5.4.4C (x310-26FT,x310-26FP,x310-50FT,x310-50FP) User Manual

Page 2027

background image

Trigger Commands

Software Reference for x310 Series Switches

C613-50046-01 REV A

AlliedWare Plus

TM

Operating System - Version 5.4.4C

77.7

script

This command specifies one or more scripts that are to be run when the trigger activates.
You can add up to five scripts to a single trigger.

The sequence in which the trigger runs the scripts is specified by the number you set
before the name of the script file. One script is executed completely before the next script
begins.

Scripts may be either ASH shell scripts, indicated by a .sh filename extension suffix, or
AlliedWare Plus™ scripts, indicated by a .scp filename extension suffix. AlliedWare Plus™
scripts only need to be readable.

The no variant of this command removes one or more scripts from the trigger’s script list.
The scripts are identified by either their name, or by specifying their position in the script
list. The all parameter removes all scripts from the trigger.

Syntax

script <1-5> {<filename>}

no script {<1-5>|<filename>|all}

Mode

Trigger Configuration

Examples

To configure trigger 71 to run the script flash:/cpu_trig.sh in position 3 when the trigger
activates, use the commands:

To configure trigger 99 to run the scripts flash:reconfig.scp, flash:cpu_trig.sh and
flash:email.scp in positions 2, 3 and 5 when the trigger activates, use the following
commands:

To remove the scripts 1, 3 and 4 from trigger 71’s script list, use the commands:

Parameter

Description

<1-5>

The position of the script in execution sequence. The trigger runs the
lowest numbered script first.

<filename>

The path to the script file.

awplus#

configure terminal

awplus(config)#

trigger 71

awplus(config-trigger)#

script 3 flash:/cpu_trig.sh

awplus#

configure terminal

awplus(config)#

trigger 99

awplus(config-trigger)#

script 2 flash:/reconfig.scp 3 flash:/
cpu_trig.sh 5 flash:/email.scp

awplus#

configure terminal

awplus(config)#

trigger 71

awplus(config-trigger)#

no script 1 3 4