dracut/0520-Ignore-module-resolution-errors.patch

26 lines
818 B
Diff
Raw Normal View History

From 7ede212132383c7f4a6624f3d1e999f1a4a70bb4 Mon Sep 17 00:00:00 2001
From: Daniel Molkentin <dmolkentin@suse.com>
Date: Mon, 8 May 2017 17:32:11 +0200
Subject: [PATCH] Ignore module resolution errors
Can occur with version-unique modules names for kgraft.
Reference: bsc#1037120
diff --git a/dracut.sh b/dracut.sh
index f4794d1d..69833cab 100755
--- a/dracut.sh
+++ b/dracut.sh
@@ -1237,7 +1237,7 @@ if [[ $hostonly ]]; then
host_modules["$alias"]=1
done
# mod might be an alias in the target kernel, find the real module
- mod_filename=$(modinfo -k "$kernel" "$mod" -F filename)
+ mod_filename=$(modinfo -k "$kernel" "$mod" -F filename 2>/dev/null)
[ $? -ne 0 ] && continue
host_modules["$(basename -s .ko "$mod_filename")"]=1
done
--
2.12.0