aboutsummarylogtreecommitdiffstats
path: root/systemd-report-entropy
diff options
context:
space:
mode:
Diffstat (limited to 'systemd-report-entropy')
-rwxr-xr-xsystemd-report-entropy8
1 files changed, 5 insertions, 3 deletions
diff --git a/systemd-report-entropy b/systemd-report-entropy
index 27feefe32c63..ed5c306d9de8 100755
--- a/systemd-report-entropy
+++ b/systemd-report-entropy
@@ -1,9 +1,11 @@
#!/bin/bash
while true; do
entropy=$(cat /proc/sys/kernel/random/entropy_avail)
- echo "ENTROPY $(date -Ins) $entropy"
- sleep $(echo "$entropy / 10000" | bc -l)
- echo -n "REPORT ENTROPY is-system-running: "
+ echo -n "ENTROPY $(date -Ins) $entropy"
+ sleepms=$(echo "$(( $entropy < 100 ? 100 : $entropy )) / 10" | bc -l)
+ echo -e " sleeping $sleepms ms"
+ sleep $(echo "$sleepms / 1000" | bc -l)
+ echo -n "is-system-running: "
if systemctl is-system-running; then
echo "REPORT ENTROPY systemd boot finished, quit."
exit