dracut/0013-feat-systemd-include-systemd-config-files-from-usr-l.patch
Pavel Valena 52fb8f6eda Rebase to dracut-102, and additional fixes.
From-source-git-commit: 56bf1917de004cd3f9032a68a6cd09d5bd972b04

Additional fixes:

 - support for erofs in squash modules
 - always include the resume module
 - include systemd config files from /usr/lib/systemd
 - only return block devices from get_persistent_dev
 - allow for \ in get_maj_min file path
 - install blk modules using symbol blk_alloc_disk

Resolves: RHEL-32237,RHEL-32506,RHEL-43460,RHEL-47145,RHEL-49744,RHEL-53350
2024-08-08 04:43:00 +02:00

113 lines
5.0 KiB
Diff

From 3e4a22f2b72d0723fd43ca917b8aa9003c6c7f8f Mon Sep 17 00:00:00 2001
From: Pavel Valena <pvalena@redhat.com>
Date: Wed, 12 Jun 2024 06:06:32 +0200
Subject: [PATCH 13/24] feat(systemd*): include systemd config files from
/usr/lib/systemd
and also use proper variables for the paths, and fixup invalid paths.
--
The new systemd reads from both /etc and /usr/, so to accomodate this,
I've added new paths to install configs from (I probably haven't covered
all). This changes only hostonly behaviour; uses global variables:
systemdutilconfdir: "/etc/systemd"
systemdutildir: "/lib/systemd:/lib/systemd/systemd-udevd" "/usr/lib/systemd:/usr/lib/systemd/systemd-udevd"
(cherry picked from commit ea4905e944a2acd75ba3a48a5dfeaba417f724e8)
Resolves: RHEL-32506
---
modules.d/00systemd/module-setup.sh | 6 ++++--
modules.d/01systemd-coredump/module-setup.sh | 3 ++-
modules.d/01systemd-pstore/module-setup.sh | 2 ++
modules.d/01systemd-resolved/module-setup.sh | 1 +
modules.d/01systemd-timesyncd/module-setup.sh | 1 +
5 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/modules.d/00systemd/module-setup.sh b/modules.d/00systemd/module-setup.sh
index d173c99f..0f151289 100755
--- a/modules.d/00systemd/module-setup.sh
+++ b/modules.d/00systemd/module-setup.sh
@@ -42,6 +42,8 @@ install() {
"$systemdutildir"/system-generators/systemd-debug-generator \
"$systemdutildir"/system-generators/systemd-fstab-generator \
"$systemdutildir"/system-generators/systemd-gpt-auto-generator \
+ "$systemdutildir"/system.conf \
+ "$systemdutildir"/system.conf.d/*.conf \
"$systemdsystemunitdir"/debug-shell.service \
"$systemdsystemunitdir"/cryptsetup.target \
"$systemdsystemunitdir"/cryptsetup-pre.target \
@@ -94,8 +96,8 @@ install() {
if [[ $hostonly ]]; then
inst_multiple -H -o \
- /etc/systemd/system.conf \
- /etc/systemd/system.conf.d/*.conf \
+ "$systemdutilconfdir"/system.conf \
+ "$systemdutilconfdir"/system.conf.d/*.conf \
/etc/hosts \
/etc/hostname \
/etc/nsswitch.conf \
diff --git a/modules.d/01systemd-coredump/module-setup.sh b/modules.d/01systemd-coredump/module-setup.sh
index 47666b6c..17deb088 100755
--- a/modules.d/01systemd-coredump/module-setup.sh
+++ b/modules.d/01systemd-coredump/module-setup.sh
@@ -33,6 +33,7 @@ install() {
inst_multiple -o \
"$sysctld"/50-coredump.conf \
"$systemdutildir"/coredump.conf \
+ "$systemdutildir/coredump.conf.d/*.conf" \
"$systemdutildir"/systemd-coredump \
"$systemdsystemunitdir"/systemd-coredump.socket \
"$systemdsystemunitdir"/systemd-coredump@.service \
@@ -51,7 +52,7 @@ install() {
if [[ $hostonly ]]; then
inst_multiple -H -o \
"$systemdutilconfdir"/coredump.conf \
- "$systemdsystemconfdir/coredump.conf.d/*.conf" \
+ "$systemdutilconfdir/coredump.conf.d/*.conf" \
"$systemdsystemconfdir"/systemd-coredump.socket \
"$systemdsystemconfdir/systemd-coredump.socket.d/*.conf" \
"$systemdsystemconfdir"/systemd-coredump@.service \
diff --git a/modules.d/01systemd-pstore/module-setup.sh b/modules.d/01systemd-pstore/module-setup.sh
index 67034bbf..5de5db4b 100755
--- a/modules.d/01systemd-pstore/module-setup.sh
+++ b/modules.d/01systemd-pstore/module-setup.sh
@@ -34,6 +34,8 @@ install() {
inst_dir /var/lib/systemd/pstore
inst_multiple -o \
"$tmpfilesdir/systemd-pstore.conf" \
+ "$systemdutildir"/pstore.conf \
+ "$systemdutildir/pstore.conf.d/*.conf" \
"$systemdutildir"/systemd-pstore \
"$systemdsystemunitdir"/systemd-pstore.service \
"$systemdsystemunitdir/systemd-pstore.service.d/*.conf"
diff --git a/modules.d/01systemd-resolved/module-setup.sh b/modules.d/01systemd-resolved/module-setup.sh
index 0c2e8c28..7b4b26e8 100755
--- a/modules.d/01systemd-resolved/module-setup.sh
+++ b/modules.d/01systemd-resolved/module-setup.sh
@@ -49,6 +49,7 @@ install() {
# Install the hosts local user configurations if enabled.
if [[ $hostonly ]]; then
inst_multiple -H -o \
+ "$systemdutilconfdir"/resolv.conf \
"$systemdutilconfdir"/resolved.conf \
"$systemdutilconfdir/resolved.conf.d/*.conf" \
"$systemdsystemconfdir"/systemd-resolved.service \
diff --git a/modules.d/01systemd-timesyncd/module-setup.sh b/modules.d/01systemd-timesyncd/module-setup.sh
index a2c67540..77f7b113 100755
--- a/modules.d/01systemd-timesyncd/module-setup.sh
+++ b/modules.d/01systemd-timesyncd/module-setup.sh
@@ -38,6 +38,7 @@ install() {
"$systemdntpunits/*.list" \
"$systemdutildir"/systemd-timesyncd \
"$systemdutildir"/systemd-time-wait-sync \
+ "$systemdutildir"/timesyncd.conf \
"$systemdutildir/timesyncd.conf.d/*.conf" \
"$systemdsystemunitdir"/systemd-timesyncd.service \
"$systemdsystemunitdir/systemd-timesyncd.service.d/*.conf" \
--
2.42.0