20 | Smart Scripting
www.dell.com | support.dell.com
Creating PERL, Python and UNIX Scripts
When you install the Smart Scripting package, sample PERL and Python scripts are
installed in the /usr/pkg/scripts/sample_scripts directory. You can also create your
own customized scripts and store them anywhere on the switch, such as in a /f10/
flash_ scripts directory.
In addition, you can use the PERL, Python, and UNIX APIs to create scripts that
invoke function calls directly in the FTOS CLI. These APIs provide a shortcut when
writing scripts. Refer to the following sections for more information:
• Using the PERL API
• Using the Python API
• Using UNIX Shell Scripting
For instructions on how to run a PERL, Python, or UNIX script from the FTOS CLI,
see Running a Script from the FTOS CLI.
For information on how to run a PERL, Python, or UNIX script directly from a UNIX
shell, see Running a Script from the UNIX Shell.
Creating a User Name and Password for Smart
Scripting
Before you run a script from the FTOS CLI, you may want to configure an additional
user name and password to be used only to run scripts on a switch. The user name and
password are used to log in to a UNIX shell and apply the read-write privileges
assigned to the user name when a script is run with the
script command from the
FTOS CLI.
The user name is an optional entry in the
script command (see Running a Script from
the FTOS CLI). To satisfy the requirements for a UNIX BSD login, the username
must be less than 16 characters. A username used to run scripts cannot contain special
characters.
Command Syntax Command Mode Task
username name password password CONFIGURATION Create an additional user name and password
that are used to log in to a shell and apply
read-write privileges when a script is run.