From 87044318e9acb741e1b74767f30cc4ae802ed398 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 25 Mar 2022 21:37:44 -0600 Subject: Use seedrng for seeding the random number generator The RNG can't actually be seeded from a shell script, due to the reliance on ioctls. For this reason, the seedrng project provides a basic script meant to be copy and pasted into projects like void-runit and tweaked as needed: . This commit imports it into void-runit and wires up the init scripts to call it. This also is a significant improvement over the current init script, which fails to remove seed files that have already been used, or to ratchet them forward. --- Makefile | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 877969b..08117ab 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,7 @@ all: $(CC) $(CFLAGS) halt.c -o halt $(LDFLAGS) $(CC) $(CFLAGS) pause.c -o pause $(LDFLAGS) $(CC) $(CFLAGS) vlogger.c -o vlogger $(LDFLAGS) + $(CC) $(CFLAGS) seedrng.c -o seedrng $(LDFLAGS) install: install -d ${DESTDIR}/${PREFIX}/sbin @@ -13,6 +14,7 @@ install: install -m755 vlogger ${DESTDIR}/${PREFIX}/sbin install -m755 shutdown ${DESTDIR}/${PREFIX}/sbin/shutdown install -m755 modules-load ${DESTDIR}/${PREFIX}/sbin/modules-load + install -m755 seedrng ${DESTDIR}/${PREFIX}/sbin/seedrng install -m755 zzz ${DESTDIR}/${PREFIX}/sbin ln -sf zzz ${DESTDIR}/${PREFIX}/sbin/ZZZ ln -sf halt ${DESTDIR}/${PREFIX}/sbin/poweroff -- cgit 1.4.1