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");
+&General::system("/usr/local/bin/extrahdctrl", "scanhd", "ide");
+&General::system("/usr/local/bin/extrahdctrl", "scanhd", "partitions");
&Header::showhttpheaders();
UUID=$extrahdsettings{'UUID'};$extrahdsettings{'FS'};$extrahdsettings{'PATH'};
END
;
- system("/usr/local/bin/extrahdctrl mount $extrahdsettings{'PATH'}");
+ &General::system("/usr/local/bin/extrahdctrl", "mount", "$extrahdsettings{'PATH'}");
}
}
elsif ($extrahdsettings{'ACTION'} eq $Lang::tr{'delete'})
{
- if ( `/usr/local/bin/extrahdctrl umount $extrahdsettings{'PATH'}` ) {
+ if ( &General::system("/usr/local/bin/extrahdctrl", "umount", "$extrahdsettings{'PATH'}")) {
open( FILE, "< $devicefile" ) or die "Unable to read $devicefile";
@tmp = <FILE>;
close FILE;
{
@deviceline = split( /\;/, $deviceentry );
my $color="$Header::colourred";
- if ( ! `/bin/mountpoint $deviceline[2] | grep " not "` ) {
+
+ # Use safe system_output to get mountpoint details.
+ my @mountpoint = &General::system_output("/bin/mountpoint", "$deviceline[2]");
+
+ if ( ! grep(/not/, @mountpoint)) {
$color=$Header::colourgreen;
}
print <<END
<input type='hidden' name='DEVICE' value='$deviceline[0]' />
<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='hidden' name='ACTION' value='$Lang::tr{'delete'}' />
<input type='image' alt='$Lang::tr{'delete'}' title='$Lang::tr{'delete'}' src='/images/delete.gif' />
</form></td></tr>
END
<td align="center">
<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='hidden' name='ACTION' value='$Lang::tr{'add'}' />
<input type='image' alt='$Lang::tr{'add'}' title='$Lang::tr{'add'}' src='/images/add.gif' />
</form></td></tr>
END