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
master
Harald Hoyer 2017-01-18 10:34:00 +01:00
parent 5ebf48d2ba
commit 1d832b4bf4
1 changed files with 12 additions and 1 deletions

View File

@ -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
}
}