fix(systemd-modules-load): misc repairs
- Removing dependency on the systemd meta module since it causes circular dependency, prevents the existance of multiple systemd based meta modules and is redunant. - Removing directory creation for modules-load since it should not be necessary and if it turns out that it is, it will be re-introduced in the form of a systemd tmpfile instead of inst_dir. - Add a missing inclusion of configuration files placed in /usr/lib/modules-load.d and /etc/modules-load.d ( hostonly ) directories. - Fix a spelling error in the systemd type unit file conf directory overwrite in the hostonly section.master
parent
b7d3caef67
commit
782ac8f1f6
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
# This file is part of dracut.
|
# This file is part of dracut.
|
||||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
@ -16,33 +16,29 @@ check() {
|
||||||
# Module dependency requirements.
|
# Module dependency requirements.
|
||||||
depends() {
|
depends() {
|
||||||
|
|
||||||
# This module has external dependency on the systemd module.
|
# Return 0 to include the dependent module(s) in the initramfs.
|
||||||
echo systemd
|
|
||||||
# Return 0 to include the dependent systemd module in the initramfs.
|
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Install the required file(s) for the module in the initramfs.
|
# Install the required file(s) and directories for the module in the initramfs.
|
||||||
install() {
|
install() {
|
||||||
|
|
||||||
# Create systemd-modules-load related directories.
|
|
||||||
inst_dir "$modulesload"
|
|
||||||
inst_dir "$modulesloadconfdir"
|
|
||||||
|
|
||||||
# Install related files for systemd-modules-load
|
|
||||||
inst_multiple -o \
|
inst_multiple -o \
|
||||||
|
"$modulesload/*.conf" \
|
||||||
|
"$systemdutildir"/systemd-modules-load \
|
||||||
"$systemdsystemunitdir"/systemd-modules-load.service \
|
"$systemdsystemunitdir"/systemd-modules-load.service \
|
||||||
"$systemdutildir"/systemd-modules-load
|
"$systemdsystemunitdir"/sysinit.target.wants/systemd-modules-load.service
|
||||||
|
|
||||||
# Install local user configurations if host only is enabled..
|
# Enable systemd type unit(s)
|
||||||
if [[ $hostonly ]]; then
|
|
||||||
inst_multiple -H -o \
|
|
||||||
"$systemdsystemconfdir"/systemd-modules-load.service \
|
|
||||||
"$systemdsystemconfdir"/systemd-systemd-modules-load.d/*.conf
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Enable the systemd type service unit for systemd-modules-load.
|
|
||||||
$SYSTEMCTL -q --root "$initdir" enable systemd-modules-load.service
|
$SYSTEMCTL -q --root "$initdir" enable systemd-modules-load.service
|
||||||
|
|
||||||
|
# Install the hosts local user configurations if enabled.
|
||||||
|
if [[ $hostonly ]]; then
|
||||||
|
inst_multiple -H -o \
|
||||||
|
"$modulesloadconfdir/*.conf" \
|
||||||
|
"$systemdsystemconfdir"/systemd-modules-load.service \
|
||||||
|
"$systemdsystemconfdir/systemd-modules-load.service.d/*.conf"
|
||||||
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue