]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
mdstat.cgi: Print mdstat status in pure perl
authorStefan Schantl <stefan.schantl@ipfire.org>
Thu, 20 May 2021 17:46:59 +0000 (19:46 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 17 Jun 2021 20:11:37 +0000 (20:11 +0000)
Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
html/cgi-bin/mdstat.cgi

index d476e074d63464ba14eb4fc7eeb0df3b8ca427c2..9ee2b15a1a1cb8bb5380637c360dd8d5464d5614 100644 (file)
@@ -42,7 +42,13 @@ my %mainsettings = ();
 &Header::openbox('100%', 'left',"MD Raid State");
 
 print '<textarea rows="25" cols="80" readonly="readonly">';
-print `cat "/proc/mdstat"`;
+
+# Grab mdstat status.
+open(MDSTAT, "/proc/mdstat");
+my @mdstat = <MDSTAT>;
+close(MDSTAT);
+print "@mdstat";
+
 print '</textarea>';
 
 &Header::closebox();