Skip to content

Commit

Permalink
feat(systemd*): include systemd config files from /usr/lib/systemd (b…
Browse files Browse the repository at this point in the history
…sc#1228398)

and also use proper variables for the 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"

Ref: https://issues.redhat.com/browse/RHEL-32506
(cherry picked from commit dracut-ng/dracut-ng@6c99c07)
  • Loading branch information
pvalena authored and aafeijoo-suse committed Aug 19, 2024
1 parent a89da38 commit 003f23a
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 3 deletions.
6 changes: 4 additions & 2 deletions modules.d/00systemd/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,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 \
Expand Down Expand Up @@ -167,8 +169,8 @@ install() {
inst_multiple -H -o \
/etc/systemd/journald.conf \
/etc/systemd/journald.conf.d/*.conf \
/etc/systemd/system.conf \
/etc/systemd/system.conf.d/*.conf \
"$systemdutilconfdir"/system.conf \
"$systemdutilconfdir"/system.conf.d/*.conf \
"$systemdsystemconfdir"/[email protected] \
"$systemdsystemconfdir/[email protected]/*.conf" \
/etc/hosts \
Expand Down
3 changes: 2 additions & 1 deletion modules.d/01systemd-coredump/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"/[email protected] \
Expand All @@ -44,7 +45,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"/[email protected] \
Expand Down
2 changes: 2 additions & 0 deletions modules.d/01systemd-pstore/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions modules.d/01systemd-resolved/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
1 change: 1 addition & 0 deletions modules.d/01systemd-timesyncd/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand Down

0 comments on commit 003f23a

Please sign in to comment.