systemd: plug random seed loading into systemd-random-seed

Reuse its dependencies to make sure it is loaded early enough.

Reported by @adrelanos
Fixes QubesOS/qubes-issues#1761
This commit is contained in:
Marek Marczykowski-Górecki 2016-07-16 23:44:57 +02:00
parent 9b362a6d7d
commit 65f0b26600
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
6 changed files with 8 additions and 16 deletions

View File

@ -52,6 +52,7 @@ SYSTEM_DROPINS += NetworkManager.service NetworkManager-wait-online.service ntpd
SYSTEM_DROPINS += tinyproxy.service
SYSTEM_DROPINS += tmp.mount
SYSTEM_DROPINS += org.cups.cupsd.service org.cups.cupsd.path org.cups.cupsd.socket
SYSTEM_DROPINS += systemd-random-seed.service
USER_DROPINS := pulseaudio.service pulseaudio.socket

View File

@ -552,7 +552,6 @@ The Qubes core startup configuration for SystemD init.
/lib/systemd/system/qubes-update-check.timer
/lib/systemd/system/qubes-updates-proxy.service
/lib/systemd/system/qubes-qrexec-agent.service
/lib/systemd/system/qubes-random-seed.service
/lib/systemd/system-preset/75-qubes-vm.preset
/lib/modules-load.d/qubes-core.conf
/lib/modules-load.d/qubes-misc.conf
@ -579,6 +578,7 @@ The Qubes core startup configuration for SystemD init.
/lib/systemd/system/NetworkManager.service.d/30_qubes.conf
/lib/systemd/system/NetworkManager-wait-online.service.d/30_qubes.conf
/lib/systemd/system/ntpd.service.d/30_qubes.conf
/lib/systemd/system/systemd-random-seed.service.d/30_qubes.conf
/lib/systemd/system/tinyproxy.service.d/30_not_needed_in_qubes_by_default.conf
/lib/systemd/system/tmp.mount.d/30_qubes.conf
/lib/systemd/user/pulseaudio.service.d/30_qubes.conf
@ -594,7 +594,6 @@ else
services="qubes-dvm qubes-misc-post qubes-firewall qubes-mount-dirs"
services="$services qubes-netwatcher qubes-network qubes-sysinit"
services="$services qubes-iptables qubes-updates-proxy qubes-qrexec-agent"
services="$services qubes-random-seed"
for srv in $services; do
/bin/systemctl --no-reload preset $srv.service
done

View File

@ -71,7 +71,6 @@ enable qubes-firewall.service
enable qubes-netwatcher.service
enable qubes-meminfo-writer.service
enable qubes-iptables.service
enable qubes-random-seed.service
enable haveged.service
enable chronyd.service
enable xendriverdomain.service

View File

@ -21,4 +21,4 @@ free | grep Mem: |
echo "Waiting for save/restore..."
qubesdb-read /qubes-restore-complete || wait $watch_pid
echo Back to life.
systemctl restart qubes-random-seed.service
systemctl restart systemd-random-seed.service

View File

@ -1,12 +0,0 @@
[Unit]
Description=Qubes Random Seed
DefaultDependencies=no
After=qubes-db.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/lib/qubes/init/qubes-random-seed.sh
[Install]
WantedBy=sysinit.target

View File

@ -0,0 +1,5 @@
[Unit]
After=qubes-db.service
[Service]
ExecStart=/usr/lib/qubes/init/qubes-random-seed.sh