diff options
author | Jiachen YANG | 2020-12-08 16:01:20 +0900 |
---|---|---|
committer | Jiachen YANG | 2020-12-08 16:01:20 +0900 |
commit | 18eadd836754e5b52b9d2c426fcf8939a41432e1 (patch) | |
tree | b716e548165a69709043ef07ee05f7b259413a1c /systemd-report-entropy | |
parent | 1e942b920b64da0d1a52526c20215bc8f886649f (diff) | |
download | aur-18eadd836754e5b52b9d2c426fcf8939a41432e1.tar.gz |
systemd-report-entropy: sync from github
Diffstat (limited to 'systemd-report-entropy')
-rwxr-xr-x | systemd-report-entropy | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/systemd-report-entropy b/systemd-report-entropy index ed5c306d9de8..482d32db03a5 100755 --- a/systemd-report-entropy +++ b/systemd-report-entropy @@ -1,12 +1,13 @@ #!/bin/bash while true; do entropy=$(cat /proc/sys/kernel/random/entropy_avail) - echo -n "ENTROPY $(date -Ins) $entropy" + 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) - echo -n "is-system-running: " - if systemctl is-system-running; then + 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 |