From patchwork Fri Jun 23 04:01:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 6951 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4QnNpb3Nl3z3wmM for ; Fri, 23 Jun 2023 04:01:43 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail02.haj.ipfire.org", Issuer "R3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 4QnNpX2njcz2Sf; Fri, 23 Jun 2023 04:01:40 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4QnNpX1MRgz30GQ; Fri, 23 Jun 2023 04:01:40 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) client-signature ECDSA (P-384)) (Client CN "mail01.haj.ipfire.org", Issuer "R3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4QnNpW0m1jz30Cv for ; Fri, 23 Jun 2023 04:01:39 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4QnNpT6n4Zz2SM; Fri, 23 Jun 2023 04:01:37 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1687492898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=F2gklaxI1rwnUoQfkP/gLBzEmf59E7XfzYPk5gCi/PU=; b=YQxUl20jJa15YlO4vKtVGQSznwQ8X3b2Md6uoI3JBg5kO0MO1yt5EnKgT2COl5Z0Es4InA D4dP/VffXM2yf2Dg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1687492898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=F2gklaxI1rwnUoQfkP/gLBzEmf59E7XfzYPk5gCi/PU=; b=QXdvpTp3eOX8viDR6thQYLMfFFmYsb2rNtKe6FrKbrCzis7T0uV2pGdPO1yawcDCtPGale qVB/9RcF0ARG7pAMYIB+ogL26sLdUMRHDwZXtl+g2Xn1m8tgWPzysZCUNdKPkYIEpy28G/ CqJmmqMWY54H9myAoUaoZlH7c5jG4jd73vFQNcYRVQKqWvB2f2b55WfYTVjK7MwVajVQud 175gm3PaEVJzxOVuzZbkDSzdRK5pWTdtNMrAgMjJ1WqhO0VFsZG5qN9QMjnN15kzTOiDLt vvRu815h9692CngIt+x85RVpSNT4GL2VEM5jnTPy2KTc5I0YgJM9RL3r0QqpTA== From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH 6/8] extrahd.cgi: Display mount status next to the corresponding drive Date: Fri, 23 Jun 2023 06:01:22 +0200 Message-Id: <20230623040124.3826-6-stefan.schantl@ipfire.org> In-Reply-To: <20230623040124.3826-1-stefan.schantl@ipfire.org> References: <20230623040124.3826-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: IPFire development talk List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: development-bounces@lists.ipfire.org Sender: "Development" Signed-off-by: Stefan Schantl --- html/cgi-bin/extrahd.cgi | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/html/cgi-bin/extrahd.cgi b/html/cgi-bin/extrahd.cgi index 533d0cdce..a4d6e2e3a 100644 --- a/html/cgi-bin/extrahd.cgi +++ b/html/cgi-bin/extrahd.cgi @@ -302,14 +302,31 @@ END print < - + - END -; unless($disabled) { - print"\n"; +; + # Check if the mountpoint refers to a known configured drive. + if(&is_configured($mountpoint)) { + print "\n"; + print "\n"; + + # Check if the device is mounted properly. + if(&is_mounted($mountpoint)) { + print "MOUNTED \n"; + } else { + print "NOT MOUNTED \n"; + } + + print "\n"; + } else { + unless($disabled) { + print "\n"; + print "UNCONFIGURED \n"; + print "\n"; + } } print <