[OpenWrt-Devel] [PATCH 3/4] base-files: move urandom seed bits into separate package

Yousong Zhou yszhou4tech at gmail.com
Tue May 28 05:00:48 PDT 2019


On Tue, 28 May 2019 at 05:30, Petr Štetiar <ynezz at true.cz> wrote:

...

> +
> +save() {
> +    touch "$1.tmp"
> +    chown root:root "$1.tmp"
> +    chmod 600 "$1.tmp"
> +    getrandom 512 > "$1.tmp"
> +    mv "$1.tmp" "$1"
> +    echo "Seed saved ($1)"
> +}

Maybe we could prepare the .tmp file in /tmp of tmpfs type, to save a
few rounds of nor flash writes.

                yousong



More information about the openwrt-devel mailing list