
8: Device Ports
SLB™ Branch Office Manager User Guide
147
Custom Script Syntax
This section describes the scripting syntax for Custom Scripts. The syntax is more flexible than
Interactive Script syntax, but still has restrictions to prevent the creation of scripts containing
potentially harmful commands. In addition, Custom Scripts can be configured to use command line
parameters. Custom Scripts have the following guidelines:
1. The size of the script file cannot exceed 6 Kbytes.
2. The size of the results generated by the script cannot exceed 1 Kbyte (any results over 1Kbyte
will be truncated).
3. The first line of the script must contain a Linux script style interpreter directive so that the SLB
will know which interpreter to use to run the script. The format of the first line is
#! expect
,
#! tcl,
or
#! python
. When a custom script is imported, the interpreter line must match
the selected script or file type (Expect, Tcl or Python), otherwise the script will be invalid.
4. The script should include a spawn command to connect the script to either a SLB CLI session
or a SLB Device Port session. Refer to the following spawn command syntax:
if, elseif and
else
The
if
command executes an associated block of commands if its Boolean
expression evaluates to TRUE. Each command within the block must be a Primary
command. Syntax:
if {<Boolean expression>} {
command 1
command 2
...
command n
}
The
elseif
command is used in association with an
if
command - it must
immediately follow an if or
elseif
command. It executes an associated block of
commands if its Boolean expression evaluates to TRUE. Each command within the
block must be a Primay command. Syntax:
elseif {<Boolean expression>} {
command 1
command 2
...
command n
}
The
else
command is used in combination with an if or
elseif
command to
provide a default path of execution. If the Boolean expressions for all preceding if
and
elseif
commands evaluate to FALSE the associated block of commands is
executed. Each command within the block must be a primary command. Syntax:
else {
command 1
command 2
...
command n
}
Command
Description
Содержание 100-120 VAC SLB
Страница 114: ...8 Device Ports SLB Branch Office Manager User Guide 114 Figure 8 4 Device Ports Settings ...
Страница 131: ...8 Device Ports SLB Branch Office Manager User Guide 131 Figure 8 10 Devices Power Outlets ...
Страница 174: ...9 USB Port SLB Branch Office Manager User Guide 174 Figure 9 3 Devices USB Modem ...
Страница 227: ...12 Maintenance SLB Branch Office Manager User Guide 227 Figure 12 1 Maintenance Firmware Configurations ...