diff options
author | Peter Wu <peter@lekensteyn.nl> | 2016-09-11 15:56:18 +0200 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2016-09-11 15:56:18 +0200 |
commit | 2e5b6ae90ff243f2e7015f015a773204fe94c006 (patch) | |
tree | a37ad271b397e860ef4d3d62838f584c4304859c | |
parent | a40f6e6c586f5ff27edb108def9a66cdf43b1e1a (diff) | |
download | scripts-2e5b6ae90ff243f2e7015f015a773204fe94c006.tar.gz |
Revert "hwrand.pl,hwrand.py: forward randomness"
This reverts commit 7851407fe89228897d01278bb1929f817821a701.
Hardware randomness is automatically added to the pools, these scripts
are not really needed. The original issue that made the boot hang was
fixed in Linux v4.7-12388-g0cbbc422.
-rwxr-xr-x | hwrand.pl | 8 | ||||
-rwxr-xr-x | hwrand.py | 7 |
2 files changed, 0 insertions, 15 deletions
diff --git a/hwrand.pl b/hwrand.pl deleted file mode 100755 index 87fd667..0000000 --- a/hwrand.pl +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/perl -open my $hw, "</dev/hwrng" and open my $rnd, "</dev/random" or die; -for (;;) { - my $l = read $hw, my $d, 512; - ioctl $rnd, 0x40085203, pack("ii", 4 * $l, $l) . $d or die; - vec(my $w, fileno $rnd, 1) = 1; - select undef, $w, undef, undef -} diff --git a/hwrand.py b/hwrand.py deleted file mode 100755 index 92016a1..0000000 --- a/hwrand.py +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env python -import fcntl, select, struct -with open('/dev/hwrng', 'rb') as hw, open('/dev/random') as rnd: - while True: - d = hw.read(512) - fcntl.ioctl(rnd, 0x40085203, struct.pack('ii', 4 * len(d), len(d)) + d) - select.select([], [rnd], []) |