beautypg.com

Running command scripts – HP StorageWorks IP Storage Router User Manual

Page 197

background image

Maintaining and Managing the Storage Router

197

IP Storage Router SR2122-2 User Guide

You can extend commands across line boundaries by ending a line with a
backslash ( \ ) as the continuation character (

Example 23

). Use the

continuation character to make long commands more readable. The line
sequence is continued until a command line without a continuation character
is encountered. If a comment line is used to end a line continuation sequence,
you must add a blank line after the comment.

Example 23: Extended Commands:

radius-server host 10.5.0.53 \

auth-port 1644 \

timeout 60 \

retransmit 5

! Configure 1st RADIUS server

radius-server host 10.6.0.61

. . .

Scripts can be invoked from other scripts.

When scripts run, the commands and any responses are echoed on the storage
router console.

Scripts can be created on any system using any text editor and placed in the
script

directory (/ata3/script) of the target storage router using FTP. See

the

“Using FTP with the Storage Router”

section on

page 201

for details. You can

also use the copy command to copy the script file to the storage router using
HTTP or TFTP.

Running Command Scripts

Use the following procedure to execute the CLI commands stored in a script file.
In this example, the script file is named CreateSc and must exist in the
script

directory.

1. enable — Enter Administrator mode.

2. show script CreateSc

— Verify that the script, CreateSc, exists in the

script

directory and that it contains the configuration that you want to

recreate.

3. read script CreateSc or read script CreateSc force

Read and execute the CLI commands in the script file. When prompted,
confirm that you want to continue and execute the script commands.

This manual is related to the following products: