dracut/SOURCES/0225.patch

61 lines
1.9 KiB
Diff
Raw Normal View History

From d3d382cb0192c23abc448bd35b59502820a8b242 Mon Sep 17 00:00:00 2001
From: Pavel Valena <pvalena@redhat.com>
Date: Sun, 23 Jul 2023 19:44:17 +0200
Subject: [PATCH] fix(rngd): install system service file
as there's no reason to keep a copy; there shouldn't be any modifications.
In case there are args stored in a separate file (Fedora and alike),
it needs to be supplied too, but without the option to change the user.
(Cherry-picked commit: c47a44cb25c0892d9af6e66ee9d7cd2c3beca31f)
Resolves: #2181543
---
modules.d/06rngd/module-setup.sh | 9 ++++++++-
modules.d/06rngd/rngd.service | 7 -------
modules.d/06rngd/sysconfig | 1 +
3 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/modules.d/06rngd/module-setup.sh b/modules.d/06rngd/module-setup.sh
index 354bd0bb..7458e5dd 100644
--- a/modules.d/06rngd/module-setup.sh
+++ b/modules.d/06rngd/module-setup.sh
@@ -32,7 +32,14 @@ check() {
install() {
inst rngd
- inst_simple "${moddir}/rngd.service" "${systemdsystemunitdir}/rngd.service"
+ inst_simple "${systemdsystemunitdir}/rngd.service"
+
+ if [ -r /etc/sysconfig/rngd ]; then
+ inst_simple "${moddir}/sysconfig" "/etc/sysconfig/rngd"
+ fi
+
+ # make sure dependant libs are installed too
+ inst_libdir_file opensc-pkcs11.so
systemctl -q --root "$initdir" add-wants sysinit.target rngd.service
}
diff --git a/modules.d/06rngd/rngd.service b/modules.d/06rngd/rngd.service
deleted file mode 100644
index 570fbedb..00000000
--- a/modules.d/06rngd/rngd.service
+++ /dev/null
@@ -1,7 +0,0 @@
-[Unit]
-Description=Hardware RNG Entropy Gatherer Daemon
-DefaultDependencies=no
-Before=systemd-udevd.service
-
-[Service]
-ExecStart=/usr/sbin/rngd -f
diff --git a/modules.d/06rngd/sysconfig b/modules.d/06rngd/sysconfig
new file mode 100644
index 00000000..100e8deb
--- /dev/null
+++ b/modules.d/06rngd/sysconfig
@@ -0,0 +1 @@
+RNGD_ARGS="--fill-watermark=0 -x pkcs11 -x nist -x qrypt"