Commit 7de8603f authored by Leigh B Stoller's avatar Leigh B Stoller

Pipe wget through dd when fetching the metadata so we can limit

the amount of data we try to pull down, to avoid sucking the entire
web into a log file.
parent b8f6331b
......@@ -80,6 +80,7 @@ my $WGET = "/usr/local/bin/wget";
my $NEWIMAGE_EZ = "$TB/bin/newimageid_ez";
my $IMAGEDUMP = "$TB/bin/imagedump";
my $SHA1 = "/sbin/sha1";
my $DD = "/bin/dd";
my $SAVEUID = $UID;
my $IMAGEVALIDATE = "$TB/sbin/imagevalidate";
my $DELETEIMAGE = "$TB/sbin/delete_image";
......@@ -864,6 +865,7 @@ sub FetchMetadata($)
my $xml = "";
my $opts = ($debug ? "" : "-q");
my $cmd = "$WGET $opts --no-check-certificate -O - $safe_url ";
$cmd .= "| $DD bs=1 count=5k ";
if ($debug) {
print "$cmd\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment