diff options
author | Jirka Hladky <jhladky@redhat.com> | 2021-01-02 04:23:45 +0100 |
---|---|---|
committer | Jirka Hladky <jhladky@redhat.com> | 2021-01-02 04:23:45 +0100 |
commit | 9fd1bacea9f8288d5b6f62b3c3f2285429d2a0a4 (patch) | |
tree | 87c42d14cc4566e1d69563612d311343899f977c | |
parent | Added udev rules (diff) | |
download | haveged-9fd1bacea9f8288d5b6f62b3c3f2285429d2a0a4.tar.xz haveged-9fd1bacea9f8288d5b6f62b3c3f2285429d2a0a4.zip |
Fedora specific udev and dracut config files
-rw-r--r-- | contrib/Fedora/90-haveged.rules | 5 | ||||
-rwxr-xr-x | contrib/Fedora/haveged-dracut.module | 24 | ||||
-rw-r--r-- | contrib/Fedora/haveged.spec (renamed from contrib/build/fedora.spec) | 4 |
3 files changed, 31 insertions, 2 deletions
diff --git a/contrib/Fedora/90-haveged.rules b/contrib/Fedora/90-haveged.rules new file mode 100644 index 0000000..6b1c5cf --- /dev/null +++ b/contrib/Fedora/90-haveged.rules @@ -0,0 +1,5 @@ +# Start the haveged service as soon as the random device is available +# to avoid starting other services while starved of entropy + +ACTION=="add", KERNEL=="random" , SUBSYSTEM=="mem", TAG+="systemd", ENV{SYSTEMD_WANTS}+="haveged.service" + diff --git a/contrib/Fedora/haveged-dracut.module b/contrib/Fedora/haveged-dracut.module new file mode 100755 index 0000000..80eb2c5 --- /dev/null +++ b/contrib/Fedora/haveged-dracut.module @@ -0,0 +1,24 @@ +#!/bin/bash +# /usr/lib/dracut/modules.d/98haveged/module-setup.sh +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +# called by dracut +depends() { + return 0 +} + +installkernel() { + return 0 +} + +# called by dracut +install() { + inst_multiple -o \ + /usr/sbin/haveged \ + $systemdsystemunitdir/haveged.service + mkdir -p "$initdir/$systemdsystemunitdir/sysinit.target.wants" + mkdir -p "$initdir/$systemdsystemunitdir/initrd-switch-root.target.wants" + mkdir -p "$initdir/$systemdsystemunitdir/systemd-journald.service.wants" + ln_r "$systemdsystemunitdir/haveged.service" "$systemdsystemunitdir/systemd-journald.service.wants/haveged.service" +} diff --git a/contrib/build/fedora.spec b/contrib/Fedora/haveged.spec index ebad58f..2ac0364 100644 --- a/contrib/build/fedora.spec +++ b/contrib/Fedora/haveged.spec @@ -60,8 +60,8 @@ chmod 0644 COPYING README ChangeLog AUTHORS #Install systemd service file sed -e 's:@SBIN_DIR@:%{_sbindir}:g' -i init.d/service.fedora install -Dpm 0644 init.d/service.fedora %{buildroot}%{_unitdir}/%{name}.service -install -Dpm 0755 contrib/SUSE/haveged-dracut.module %{buildroot}/%{_libdir}/dracut/modules.d/98%{name}/module-setup.sh -install -Dpm 0644 contrib/SUSE/90-haveged.rules %{buildroot}%{_udevrulesdir}/90-%{name}.rules +install -Dpm 0755 contrib/Fedora/haveged-dracut.module %{buildroot}/%{_libdir}/dracut/modules.d/98%{name}/module-setup.sh +install -Dpm 0644 contrib/Fedora/90-haveged.rules %{buildroot}%{_udevrulesdir}/90-%{name}.rules # We don't ship .la files. rm -rf %{buildroot}%{_libdir}/libhavege.*a |