HP Integrated Lights-Out User Manual page 82

Hp integrated lights-out user guide
Hide thumbs Also See for HP Integrated Lights-Out:
Table of Contents

Advertisement

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 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:
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.
#!/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

Advertisement

Table of Contents
loading

Table of Contents