mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
extrahd.cgi: Fix broken UUID check
This check was totaly broken and resulted into not beeing able to configure/mount more than one extra harddrive. Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
committed by
Michael Tremer
parent
7de4ba0c8f
commit
66cb52cb0d
@@ -113,13 +113,16 @@ if ($extrahdsettings{'ACTION'} eq $Lang::tr{'add'}) {
|
||||
# Split the line into pieces and assign nice variables.
|
||||
my ($uuid, $fs, $path) = split( /\;/, $entry );
|
||||
|
||||
# Remove tailing UUID= from uuid string.
|
||||
$uuid =~ s{^UUID=}{};
|
||||
|
||||
# Check if the path is allready used.
|
||||
if ( "$extrahdsettings{'PATH'}" eq "$path" ) {
|
||||
$errormessage = "$Lang::tr{'extrahd you cant mount'} $extrahdsettings{'DEVICE'} $Lang::tr{'extrahd to'} $extrahdsettings{'PATH'} $Lang::tr{'extrahd because there is already a device mounted'}.";
|
||||
}
|
||||
|
||||
# Check if the uuid is allready used.
|
||||
if ("$extrahdsettings{'DEVICE'} eq $uuid") {
|
||||
if ("$extrahdsettings{'UUID'}" eq "$uuid") {
|
||||
$errormessage = "$extrahdsettings{'DEVICE'} is allready mounted.";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user