]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/extrahd.cgi
extrahd.cgi: Use new system methods
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / extrahd.cgi
index e277abd5110ffce4a55a651a5e8d864b53e2ff38..154efd7b28678d1b1d10800a35997d300948072c 100644 (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