When you are using the helper application, the iLO firmware posts a request to this application using the
following parameters:
• The
file
parameter contains the name of the file provided in the original URL.
• The
range
parameter contains an inclusive range (in hexadecimal) that designates where to write the
data.
• The
data
parameter contains a hexadecimal string that represents the data to be written.
The helper script must transform the
file
parameter into a path relative to its working directory. This step
might involve prefixing it with "../," or 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 that you are trying to write
#
my ($prefix) = "c:/inetpub/wwwroot";
my ($start, $end, $len, $decode);
my $q = new CGI(); # Get CGI data
my $file = $q->param('file'); # File to be written
my $range = $q->param('range'); # Byte range to be written
my $data = $q->param('data'); # Data to be written
#
# Change the file name appropriately
#
$file = $prefix . "/" . $file;
#
# Decode the range
#
if ($range =~ m/([0-9A-Fa-f]+)-([0-9A-Fa-f]+)/) {
$start = hex($1);
$end = hex($2);
$len = $end - $start + 1;
}
#
# Decode the data (a big hexadecimal string)
#
$decode = pack("H*", $data);
#
# Write it to the target file
#
sysopen(F, $file, O_RDWR);
Using iLO Virtual Media
143