diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-03 18:17:57 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-03 18:17:57 +1200 |
commit | 79c33d4ddc2cc1cf5bc5ebab066c5e345778769c (patch) | |
tree | bffc1c2b461c08b5371aaf2420212d7863f3faa7 | |
parent | Actually check for seed presence in rndi(1) (diff) | |
download | dotfiles-79c33d4ddc2cc1cf5bc5ebab066c5e345778769c.tar.gz dotfiles-79c33d4ddc2cc1cf5bc5ebab066c5e345778769c.zip |
Correct order of random search devices
-rwxr-xr-x | bin/rnds | 2 | ||||
-rw-r--r-- | man/man1/rnds.1 | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -1,7 +1,7 @@ #!/bin/sh # Try to get a low-quality random seed from a random device if possible [ "$#" -le 1 ] || exit 2 -for dev in /dev/arandom /dev/urandom /dev/random '' ; do +for dev in /dev/urandom /dev/arandom /dev/random '' ; do [ -e "$dev" ] && break done [ -n "$dev" ] || exit 1 diff --git a/man/man1/rnds.1 b/man/man1/rnds.1 index 1e76d9a1..67a3f9a7 100644 --- a/man/man1/rnds.1 +++ b/man/man1/rnds.1 @@ -13,7 +13,7 @@ the first field of a cksum(1) based on it as a low-quality random numeric seed. The only optional argument allows specifying the number of random bytes to read, defaulting to 32. This is intended as a low-quality seed for rndi(1). .P -/dev/arandom is tried first, then /dev/urandom, then /dev/random, before the +/dev/urandom is tried first, then /dev/arandom, then /dev/random, before the script gives up and emits nothing. .SH SEE ALSO rndi(1), rnda(1), rndf(1), rndl(1), rndn(6) |