X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=html%2Fcgi-bin%2Fextrahd.cgi;h=da1efb2ddff23245887643be8a3fcc60c4ae7ba0;hb=9e9b477d7c4fbad483f6307cf63bf475dd79141b;hp=7cdad0161b15f7a0bc4d08d50f7781739dfdfd17;hpb=20730a6feee96496d4933fc2cba54e0c87b7ef84;p=ipfire-2.x.git diff --git a/html/cgi-bin/extrahd.cgi b/html/cgi-bin/extrahd.cgi index 7cdad0161b..da1efb2ddf 100644 --- a/html/cgi-bin/extrahd.cgi +++ b/html/cgi-bin/extrahd.cgi @@ -48,8 +48,13 @@ my $partitionentry = ""; my $devicefile = "/var/ipfire/extrahd/devices"; my $scanfile = "/var/ipfire/extrahd/scan"; my $partitionsfile = "/var/ipfire/extrahd/partitions"; -system("/usr/local/bin/extrahdctrl scanhd ide"); -system("/usr/local/bin/extrahdctrl scanhd partitions"); + +#workaround to suppress a warning when a variable is used only once +my @dummy = ( ${Header::colourgreen}, ${Header::colourred} ); +undef (@dummy); + +system("/usr/local/bin/extrahdctrl scanhd ide >/dev/null"); +system("/usr/local/bin/extrahdctrl scanhd partitions >/dev/null"); &Header::showhttpheaders(); @@ -127,7 +132,6 @@ if ($errormessage) { ############################################################################################################################ ############################################################################################################################ -&Header::openbox('100%', 'center', $Lang::tr{'extrahd'}); open( FILE, "< $devicefile" ) or die "Unable to read $devicefile"; @devices = ; close FILE; @@ -153,7 +157,7 @@ END - + END ; @@ -162,9 +166,6 @@ END END ; - -&Header::closebox(); - &Header::openbox('100%', 'center', $Lang::tr{'extrahd detected drives'}); print < @@ -207,7 +208,7 @@ END foreach $partitionentry (sort @partitions) { @partitionline = split( /\;/, $partitionentry ); - if (( "$partitionline[0]" =~ /^$scanline[0]/ ) && ! ( "$partitionline[0]" eq "$scanline[0]" )) { + if (( "$partitionline[0]" =~ /^$scanline[0]/ ) && !( "$partitionline[2]" eq "" )) { $size = int($partitionline[1] / 1024); print < @@ -228,7 +229,7 @@ END - + END ;