beautypg.com

Command list, Activate – Allied Telesis AlliedWare Plus Operating System Version 5.4.4C (x310-26FT,x310-26FP,x310-50FT,x310-50FP) User Manual

Page 318

background image

Scripting Commands

Software Reference for x310 Series Switches

11.2

AlliedWare Plus

TM

Operating System - Version 5.4.4C

C613-50046-01 REV A

Command List

This chapter provides commands used for command scripts.

activate

This command activates a script file.

Syntax

activate [background] <script>

Mode

Privileged Exec

Usage

In a stacked environment you can use the CLI on a stack master to access file systems that
are located on a stack backup member. In this case the command specifies a file on the
backup member. The stack member’s file system will be denoted by: -

For example, awplus-1 for member 1, awplus-2 for member 2 etc.

When a script is activated, the privilege level is set to 1 enabling User Exec commands to
run in the script. If you need to run Privileged Exec commands in your script you need to
add an

enable (Privileged Exec mode)

command to the start of your script. If you need to

run Global Configuration commands in your script you need to add a

configure terminal

command after the enable command at the start of your script.

The activate command executes the script in a new shell. A

terminal length

shell

command, such as terminal length 0 may also be required to disable a delay that would
pause the display.

A script must be a text file with a filename extension of either .sh or .scp only for the
AlliedWare Plus™ CLI to activate the script file. The .sh filename extension indicates the file
is an ASH script, and the .scp filename extension indicates the file is an AlliedWare Plus™
script.

Examples

To activate a command script to run as a background process, use the command:

To activate a script /flash:/test.scp in stack member 2, use the command:

Parameter

Description

background

Activate a script to run in the background. A process that is running in
the background will operate as a separate task, and will not interrupt
foreground processing. Generally, we recommend running short,
interactive scripts in the foreground and longer scripts in the
background. The default is to run the script in the foreground.

<script>

The file name of the script to activate. The script is a command script
consisting of commands documented in this software reference.

Note that you must use either a .scp or a .sh filename extension for a
valid script text file, as described below in the usage section for this
command.

awplus#

activate background test.scp

awplus-2#

activate awplus-2/flash:/test.scp