82
User Guide Integrated Lights-Out
CGI Helper Application
The following perl script is an example of a CGI helper application that allows
diskette writes on Web servers that cannot perform partial writes. When using the
helper application, the iLO firmware posts a request to this application with three
parameters:
•
•
•
The file parameter contains the name of the file provided in the original
URL.
The range parameter contains an inclusive range (in hexadecimal)
designating where to write the data.
The data parameter contains a hexadecimal string representing the data to be
written.
The helper script must transform the file parameter into a path relative to its
working directory. This function might involve prefixing it with "../," or it might
involve transforming an aliased URL path into the true path on the file system.
The helper script requires write access to the target file. Diskette image files must
have the appropriate permissions.
Example:
#!/usr/bin/perl
use CGI;
use Fcntl;
#
# The prefix is used to get from the current working
# directory to the location of the image file#
my ($prefix) = "..";
my ($start, $end, $len, $decode);
# Get CGI data
my $q = new CGI();
# Get file to be written
my $file = $q->param('file');
# Byte range
$range = $q->param('range');
# And the data
Summary of Contents for HP Integrated Lights-Out
Page 1: ...HP Integrated Lights Out User Guide July 2004 Sixth Edition Part Number 238882 006 ...
Page 20: ......
Page 134: ......
Page 142: ......
Page 192: ......
Page 222: ......
Page 232: ...232 User Guide Integrated Lights Out ...
Page 240: ......
Page 268: ......
Page 362: ......
Page 406: ......