#!/bin/bash while true; do entropy=$(cat /proc/sys/kernel/random/entropy_avail) echo -n "At $(date -Ins) ENTROPY $entropy" sleepms=$(echo "$(( $entropy < 100 ? 100 : $entropy )) / 10" | bc -l) echo -e " sleeping $sleepms ms" sleep $(echo "$sleepms / 1000" | bc -l) is_running=$(systemctl is-system-running) echo "is-system-running: $is_running" if [[ $is_running != initializing && $is_running != starting ]]; then echo "REPORT ENTROPY systemd boot finished, quit." exit fi done