BelAir20E User Guide
Scripting Guidelines
April 2, 2012
Confidential
Document Number BDTM02201-A01 Standard
command, then your script must include special declarations. For details, see
“Including a Reboot Command in a Script” on page 231
Caution!
Using the
reboot
command in an auto-configuration script without the correct
declarations may cause the node to enter a continuous
reboot
loop.
• Test the final script to ensure all commands are valid, syntactically correct
and appropriate for the installed hardware. To help debugging, redirect the
output of the script to a file. Use the optional
<output_file>
parameter of
the
run script
command.
When you are satisfied with your script:
1 Put the final version of it on a TFTP, FTP or FTPS server to transfer the
script file to the BelAir unit.
2 Use the commands described in
“Manually Transferring Files to and from a
to transfer the script to the BelAir platforms you
want to control.
3 Use the commands described in
“Managing and Manually Running Script
as required.
The process of downloading and running a script file on startup can be
automated. For details, see the “Auto-configuration” chapter of the BelAir
platform User Guide.
Manually Transferring
Files to and from a
BelAir Node
Use the following CLI commands to manually transfer files, such as script files,
to and from a BelAir node:
/system/tftpget remoteip <ip_addr> remotefile <filename>
[localfile <filename>]
/system/tftpput remoteip <ip_addr> localfile <filename>
[remotefile <name>]
/system/getfile remoteip <ip_addr> remotefile <filename>
[localfile <filename>]
[{tftp|
ftp [user <username> password <password>]|
ftps [user <username> password <password>]}]
For the
tftpget
and
getfile
commands, if you do not specify a local file name,
then the transferred file maintains the same name as on the remote file system.
For the
tftpput
command, if you do not specify a remote file name, then the
transferred file maintains the same name as on the local file system.
For the
getfile
command:
• The default protocol is TFTP.
• For FTP, the default user name is
anonymous
and the default password is
root@
followed by the node IP address. For example, if the node has