]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
fix(rngd): install system service file
authorPavel Valena <pvalena@redhat.com>
Sun, 23 Jul 2023 17:44:17 +0000 (19:44 +0200)
committerLaszlo Gombos <laszlo.gombos@gmail.com>
Wed, 14 Aug 2024 01:40:54 +0000 (21:40 -0400)
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.

This avoids shipping and maintaining the service file.

https://bugzilla.redhat.com/show_bug.cgi?id=2181540

modules.d/06rngd/module-setup.sh
modules.d/06rngd/rngd.service [deleted file]
modules.d/06rngd/sysconfig [new file with mode: 0644]

index aec8d576cb8d87a21fedc1b1813fb0539774ba5f..e8bdf7f573f6543bffe045b6627072b043cecb16 100755 (executable)
@@ -32,7 +32,12 @@ depends() {
 
 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 dependent libs are installed too
     inst_libdir_file opensc-pkcs11.so
 
diff --git a/modules.d/06rngd/rngd.service b/modules.d/06rngd/rngd.service
deleted file mode 100644 (file)
index dd5374d..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-[Unit]
-Description=Hardware RNG Entropy Gatherer Daemon
-DefaultDependencies=no
-Before=systemd-udevd.service
-ConditionVirtualization=!container
-
-[Service]
-ExecStart=/usr/sbin/rngd -f
diff --git a/modules.d/06rngd/sysconfig b/modules.d/06rngd/sysconfig
new file mode 100644 (file)
index 0000000..68047ec
--- /dev/null
@@ -0,0 +1 @@
+RNGD_ARGS="-x pkcs11 -x nist"