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

Etienne Champetier champetier.etienne at gmail.com
Tue May 28 17:17:01 EDT 2019


Hi Yousong,

Le mar. 28 mai 2019 à 09:01, Yousong Zhou <yszhou4tech at gmail.com> a écrit :

> 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.
>

The idea was to be able to do atomic mv


>                 yousong
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20190528/08455068/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list