rng-tools: uci-fy, default to doing nothing

Enabling the default configuration will pipe /dev/urandom back into
/dev/random ala the current package behavior.  Because this amounts to
disabling the in-kernel entropy estimation, default disabled.

While here, uci-paramaterize the high watermark.
While here, add a pre-command hook for real RNGs that need 'stty raw'
or other such hooks.  (e.g. the TrueRNG devices)

As offered in github openwrt/packages#3422, take over maintainership.

See github openwrt/packages#3142.

Signed-off-by: Nathaniel Wesley Filardo <nwfilardo@gmail.com>
This commit is contained in:
Nathaniel Wesley Filardo
2016-10-30 18:27:54 -04:00
parent 2b324358e5
commit bce6d283c1
3 changed files with 24 additions and 6 deletions
+8
View File
@@ -0,0 +1,8 @@
#!/bin/sh
uci -q show system.@rngd[0] || {
uci add system rngd
uci set system.@rngd[0].enabled=0
uci set system.@rngd[0].device=/dev/urandom
uci commit
}