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();
############################################################################################################################
############################################################################################################################
-&Header::openbox('100%', 'center', $Lang::tr{'extrahd'});
open( FILE, "< $devicefile" ) or die "Unable to read $devicefile";
@devices = <FILE>;
close FILE;
<input type='hidden' name='FS' value='$deviceline[1]' />
<input type='hidden' name='PATH' value='$deviceline[2]' />
<input type='hidden' name='ACTION' value=$Lang::tr{'delete'} />
- <input type='image' alt=$Lang::tr{'delete'} src='/images/delete.gif' />
+ <input type='image' alt='$Lang::tr{'delete'}' title='$Lang::tr{'delete'}' src='/images/delete.gif' />
</form></td></tr>
END
;
</table>
END
;
-
-&Header::closebox();
-
&Header::openbox('100%', 'center', $Lang::tr{'extrahd detected drives'});
print <<END
<table border='0' width='600' cellspacing="0">
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 <<END
<form method='post' action='$ENV{'SCRIPT_NAME'}'>
<input type='hidden' name='DEVICE' value='$partitionline[0]' />
<input type='hidden' name='UUID' value='$partitionline[2]' />
<input type='hidden' name='ACTION' value=$Lang::tr{'add'} />
- <input type='image' alt=$Lang::tr{'add'} src='/images/add.gif' />
+ <input type='image' alt='$Lang::tr{'add'}' title='$Lang::tr{'add'}' src='/images/add.gif' />
</form></td></tr>
END
;