Changeset View
Changeset View
Standalone View
Standalone View
head/libexec/save-entropy/save-entropy.sh
Show First 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | while [ ${n} -ge 1 ]; do | ||||
"${entropy_dir}/saved-entropy.${n}" is not a regular file, and so \ | "${entropy_dir}/saved-entropy.${n}" is not a regular file, and so \ | ||||
it will not be rotated. Entropy file rotation is aborted. | it will not be rotated. Entropy file rotation is aborted. | ||||
exit 1 | exit 1 | ||||
fi | fi | ||||
n=$(( ${n} - 1 )) | n=$(( ${n} - 1 )) | ||||
done | done | ||||
dd if=/dev/random of=saved-entropy.1 bs=${entropy_save_sz} count=1 2>/dev/null | dd if=/dev/random of=saved-entropy.1 bs=${entropy_save_sz} count=1 2>/dev/null | ||||
fsync saved-entropy.1 "." | |||||
exit 0 | exit 0 |