From 1d832b4bf4598d4ed084a88dba687b796d644ea5 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 18 Jan 2017 10:34:00 +0100 Subject: [PATCH] fips: precreate /dev/random /dev/urandom otherwise libgcrypt might be unhappy, if used before devtmpfs is mounted https://bugzilla.redhat.com/show_bug.cgi?id=1401444 --- modules.d/01fips/module-setup.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/modules.d/01fips/module-setup.sh b/modules.d/01fips/module-setup.sh index 65177a96a..263f981bc 100755 --- a/modules.d/01fips/module-setup.sh +++ b/modules.d/01fips/module-setup.sh @@ -46,5 +46,16 @@ install() { inst_multiple -o prelink inst_simple /etc/system-fips + [ -c ${initdir}/dev/random ] || mknod ${initdir}/dev/random c 1 8 \ + || { + dfatal "Cannot create /dev/random" + dfatal "To create an initramfs with fips support, dracut has to run as root" + return 1 + } + [ -c ${initdir}/dev/urandom ] || mknod ${initdir}/dev/urandom c 1 9 \ + || { + dfatal "Cannot create /dev/random" + dfatal "To create an initramfs with fips support, dracut has to run as root" + return 1 + } } - -- 2.47.3