mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
entropy: Don't show message for HWRNGs any more
We cannot reliably detect this with the new kernel and therefore cannot show this. Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
@@ -51,14 +51,9 @@ if ( $querry[0] ne~ "") {
|
||||
# Check for hardware support.
|
||||
my $message;
|
||||
my $message_colour = $Header::colourred;
|
||||
if (&has_hwrng()) {
|
||||
$message = $Lang::tr{'system has hwrng'};
|
||||
$message_colour = $Header::colourgreen;
|
||||
} elsif (&has_rdrand()) {
|
||||
if (&has_rdrand()) {
|
||||
$message = $Lang::tr{'system has rdrand'};
|
||||
$message_colour = $Header::colourgreen;
|
||||
} else {
|
||||
$message = $Lang::tr{'no hardware random number generator'};
|
||||
}
|
||||
|
||||
my $rngd_status = "<td align='center' bgcolor='${Header::colourred}'><font color='white'><b>$Lang::tr{'stopped'}</b></font></td>";
|
||||
@@ -67,9 +62,13 @@ if ( $querry[0] ne~ "") {
|
||||
}
|
||||
|
||||
&Header::openbox('100%', 'center', $Lang::tr{'hardware support'});
|
||||
print <<EOF;
|
||||
<p style="color: $message_colour; text-align: center;">$message</p>
|
||||
if ($message) {
|
||||
print <<EOF;
|
||||
<p style="color: $message_colour; text-align: center;">$message</p>
|
||||
EOF
|
||||
}
|
||||
|
||||
print <<EOF;
|
||||
<table width='80%' cellspacing='1' class='tbl'>
|
||||
<tr>
|
||||
<th align='center'><b>$Lang::tr{'service'}</b></th>
|
||||
@@ -89,10 +88,6 @@ EOF
|
||||
&Header::closepage();
|
||||
}
|
||||
|
||||
sub has_hwrng() {
|
||||
return (-c "/dev/hwrng");
|
||||
}
|
||||
|
||||
sub has_rdrand() {
|
||||
open(FILE, "/proc/cpuinfo") or return 0;
|
||||
my @cpuinfo = <FILE>;
|
||||
|
||||
Reference in New Issue
Block a user