extrahd.cgi: Use new system methods

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
This commit is contained in:
Stefan Schantl
2021-05-17 22:32:21 +02:00
committed by Michael Tremer
parent 2bbf176619
commit 3a69c4fbbc

View File

@@ -103,7 +103,7 @@ END
}
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;
@@ -143,7 +143,11 @@ END
{
@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