0
0
mirror of https://github.com/openwrt/packages.git synced 2025-02-12 03:28:07 +00:00
packages/utils/rng-tools/files/rngd.uci_defaults
Nathaniel Wesley Filardo bce6d283c1 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>
2016-10-31 13:17:57 -04:00

9 lines
159 B
Bash

#!/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
}