BelAir20E User Guide
Scripting Guidelines
April 2, 2012
Confidential
Document Number BDTM02201-A01 Standard
Appendix C: Scripting Guidelines
This appendix provides guidance so you can create, manage and run scripts for
BelAirOS™ platforms.
General Scripting
Guidelines
This chapter introduces you to the concepts of creating and managing scripts
for platforms that use the BelAirOS. The following sections are provided:
•
•
“Creating a BelAirOS Script” on page 223
•
“Manually Transferring Files to and from a BelAir Node” on page 224
•
“Managing and Manually Running Script Files” on page 225
Overview
In general, a script is a series of programming language statements to allow
control of one or more software applications or devices. Scripts are distinct
from the core code of an application, as they are created by the end-user.
Scripts are often interpreted, whereas the applications they control are
traditionally compiled to native machine code.
For BelAirOS platforms you can create scripts consisting of valid and supported
BelAir CLI commands to:
• make repetitive tasks quicker and easier to do
• automate the configuration of a node when it starts up
Your script file must contain special declarations for the following cases:
• If you want to specify and control physical interfaces, such as
wifi-1-1
, use
“Specifying Physical Interfaces” on page 226
• Depending on the CLI commands in your script, you may need to reboot
the BelAirOS platform. If this case, use the declarations described in
“Including a Reboot Command in a Script” on page 231
Creating a BelAirOS
Script
Use the following general guidelines to create a script file:
• Make sure the script contains only valid and supported BelAir CLI
commands. If you are using an older script, make sure the CLI commands
that it contains are still valid and supported.
• Some BelAir functions, such as Network Address Translation (NAT), require
that you reboot the node after you configure them. If your script is for
BelAirOS auto-configuration at startup and if it must include the
reboot