From: Michael Tremer <michael.tremer@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: [PATCH] extrahd.cgi: Fix broken UUID check
Date: Wed, 13 Sep 2023 15:22:30 +0100 [thread overview]
Message-ID: <10D55417-1047-47FF-8C99-129F6764260B@ipfire.org> (raw)
In-Reply-To: <20230912182000.4937-1-stefan.schantl@ipfire.org>
[-- Attachment #1: Type: text/plain, Size: 1402 bytes --]
Thank you for working on this so urgently.
> On 12 Sep 2023, at 19:20, Stefan Schantl <stefan.schantl(a)ipfire.org> wrote:
>
> 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(a)ipfire.org>
> ---
> html/cgi-bin/extrahd.cgi | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/html/cgi-bin/extrahd.cgi b/html/cgi-bin/extrahd.cgi
> index 9cdfc69f8..c3a14c9e4 100644
> --- a/html/cgi-bin/extrahd.cgi
> +++ b/html/cgi-bin/extrahd.cgi
> @@ -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.";
> }
> }
> --
> 2.39.2
>
prev parent reply other threads:[~2023-09-13 14:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-12 18:20 Stefan Schantl
2023-09-13 14:22 ` Michael Tremer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=10D55417-1047-47FF-8C99-129F6764260B@ipfire.org \
--to=michael.tremer@ipfire.org \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox