HP StorageWorks XP Remote Web Console Software User Manual
Page 144

Before executing the CFL Extension commands, copy the batch files provided by Remote Web Console
to the
\Tools\CFL_CLI
directory (the same directory as
JSanCFL.jar
), and then modify the file
if necessary. The file with the
.bat
extension is for Windows, and the file with the
.sh
extension is
for UNIX.
The following examples show a batch file for the
CFLSET
command.
For Windows:
java -jar -Djava.security.policy=java.policy JSanCFL.jar myAuthentication.txt
CFLSET %1 %2
For UNIX:
#! /bin/csh
java -jar -Djava.security.policy=java.policy JSanCFL.jar myAuthentication.txt
CFLSET $1 $2
The following items may need to be changed:
•
The installation directory of a shell program
If your operating system is UNIX and a shell program is installed in a directory other than
/bin
,
you need to change
#! /bin/csh
in the first line to the installation directory of a shell program
(such as
/usr/bin/csh
).
•
The user authentication file name
If you rename the user authentication file, you need to change
myAuthentication.txt
to the
file name that you specified.
When you store the user authentication file in a directory other than
\Tools\CFL_CLI
(for ex-
ample, user's home directory), you need to specify the relative or absolute path. Only single-byte
characters can be specified for a path or file name. No double-byte characters can be specified.
•
The termination codes that the CFL Extension returns when a batch file is executed are as follows:
• 0: The command finished successfully.
• other than 0: The command finished abnormally (An error occurred).
•
If you want to use a reference to a termination code in your batch file, do the following:
• For a Windows batch file, write %errorlevel% in the batch file.
• For a UNIX Bourne shell script, write %? in the shell script.
• For a UNIX C shell script, write %status in the shell script.
The following example is a reference to a termination code used in a Windows batch file. When this
batch file is executed and the CFL Extension returns a termination code other than 0, the command
prompt displays a message indicating the command failed. When this batch file is executed and CFL
Extension returns the termination code 0, the command prompt displays a message indicating the
command finished successfully.
java -Djava.security.policy=java.policy -jar JSanCFL.jar myAuthentication.txt
CFLGET %1 %2
if %errorlevel% NEQ 0 echo COMMAND FAILED.
if %errorlevel% EQU 0 echo COMMAND SUCCESSFUL.
Using the CFL Extension
144