dracut/SOURCES/0100.patch
2021-10-08 10:44:15 +00:00

34 lines
1.3 KiB
Diff

From 045aa82701ecdebf8482b25dc0abf1b3b7cc3ce5 Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <lnykryn@redhat.com>
Date: Mon, 30 Nov 2020 11:04:42 +0100
Subject: [PATCH] fix backport of 70b19acf
The patch was missing an important hunk of the original diff which
converted another `ln_r` to `systemctl set-default`. Without it, the
initrd would try to boot `multi-user.target` instead of `initrd.target`.
The reason is that `systemctl set-default` modifies `/etc` while `ln_r`
modifies `/usr`. And so the `set-default multi-user.target` in 00systemd
takes priority over the `ln_r initrd.target` in `01systemd-initrd`.
Thanks Jonathan Lebon for spotting this.
Resolves: #1888779
---
modules.d/01systemd-initrd/module-setup.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules.d/01systemd-initrd/module-setup.sh b/modules.d/01systemd-initrd/module-setup.sh
index cb8a8fa6..a42e220a 100755
--- a/modules.d/01systemd-initrd/module-setup.sh
+++ b/modules.d/01systemd-initrd/module-setup.sh
@@ -36,7 +36,7 @@ install() {
$systemdsystemunitdir/initrd-udevadm-cleanup-db.service \
$systemdsystemunitdir/initrd-parse-etc.service
- ln_r "${systemdsystemunitdir}/initrd.target" "${systemdsystemunitdir}/default.target"
+ systemctl -q --root "$initdir" set-default initrd.target
local VERSION=""
local PRETTY_NAME=""