d4a4eb
From 9b2497dffb8f699ce040cdbafa967f5fe02b57b6 Mon Sep 17 00:00:00 2001
d4a4eb
From: Lukas Nykryn <lnykryn@redhat.com>
d4a4eb
Date: Fri, 2 Aug 2019 14:26:23 +0200
d4a4eb
Subject: [PATCH] 90kernel-modules-extra: don't resolve symlinks before instmod
d4a4eb
d4a4eb
When you install a third-party driver, you will probably end in a
d4a4eb
situation, where the module will be in a different directory and
d4a4eb
in $depmod_module_dir you will only have symlink. If we resolve the
d4a4eb
symlink before we pass the module path to instmod, the dracut-install
d4a4eb
will only include the module with its original path, but not the
d4a4eb
symlink. Hence the module can't be automatically loaded.
d4a4eb
d4a4eb
Dracut-install is clever enough to handle symlinks and will include both
d4a4eb
the symlink and the module to the initrd.
d4a4eb
d4a4eb
(cherry picked from commit d1afff43aea01c8d43817adf3ac4041dd4b9f022)
d4a4eb
d4a4eb
Resolves: #1720275
d4a4eb
---
d4a4eb
 modules.d/90kernel-modules-extra/module-setup.sh | 2 +-
d4a4eb
 1 file changed, 1 insertion(+), 1 deletion(-)
d4a4eb
d4a4eb
diff --git a/modules.d/90kernel-modules-extra/module-setup.sh b/modules.d/90kernel-modules-extra/module-setup.sh
d4a4eb
index c0a2b7f9..1706c822 100755
d4a4eb
--- a/modules.d/90kernel-modules-extra/module-setup.sh
d4a4eb
+++ b/modules.d/90kernel-modules-extra/module-setup.sh
d4a4eb
@@ -187,7 +187,7 @@ installkernel()
d4a4eb
 	printf "^%s\.ko(\.gz|\.bz2|\.xz)?:\n" "${pathlist[@]}" \
d4a4eb
 		| (LANG=C grep -E -o -f - -- "$depmod_modules_dep" || exit 0) \
d4a4eb
 		| tr -d ':' \
d4a4eb
-		| (cd "$depmod_module_dir" || exit; xargs -r realpath -e --) \
d4a4eb
+		| (cd "$depmod_module_dir" || exit; xargs -r realpath -se --) \
d4a4eb
 		| instmods || return 1
d4a4eb
 
d4a4eb
 	return 0
d4a4eb