Skip to content

Commit

Permalink
fix: install all depmod relevant configuration files
Browse files Browse the repository at this point in the history
This is important for running `depmod` in the initrd.
  • Loading branch information
haraldh committed May 4, 2021
1 parent 87c4c17 commit 50a01dd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
13 changes: 12 additions & 1 deletion dracut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1760,6 +1760,17 @@ if ! [[ -d $dracutsysrootdir$tmpfilesdir ]]; then
[[ -d $dracutsysrootdir/usr/lib/tmpfiles.d ]] && tmpfilesdir=/usr/lib/tmpfiles.d
fi
[[ -d $dracutsysrootdir$depmodd ]] \
|| sysctld=$(pkg-config libkmod --variable=depmodd 2> /dev/null)
[[ -d $dracutsysrootdir$depmodd ]] || depmodd=/usr/lib/depmod.d
[[ -d $dracutsysrootdir$depmodconfdir ]] \
|| sysctlconfdir=$(pkg-config libkmod --variable=depmodconfdir 2> /dev/null)
[[ -d $dracutsysrootdir$depmodconfdir ]] || depmodconfdir=/etc/depmod.d
export initdir dracutbasedir \
dracutmodules force_add_dracutmodules add_dracutmodules omit_dracutmodules \
mods_to_load \
Expand All @@ -1776,7 +1787,7 @@ export initdir dracutbasedir \
modulesloadconfdir sysctl sysctlconfdir sysusers sysusersconfdir \
systemdutildir systemdutilconfdir systemdcatalog systemdntpunits \
systemdntpunitsconfdir systemdsystemunitdir systemdsystemconfdir \
hostonly_cmdline loginstall tmpfilesdir
hostonly_cmdline loginstall tmpfilesdir depmodd depmodconfdir
mods_to_load=""
# check all our modules to see if they should be sourced.
Expand Down
5 changes: 5 additions & 0 deletions modules.d/90kernel-modules/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ installkernel() {
hostonly='' instmods "=crypto"
instmods "=arch/$arch/crypto" "=drivers/crypto"
fi

inst_multiple -o "$depmodd/*.conf"
if [[ $hostonly ]]; then
inst_multiple -H -o "$depmodconfdir/*.conf"
fi
:
}

Expand Down

0 comments on commit 50a01dd

Please sign in to comment.