Skip to content

Commit 35e125e

Browse files
committed
feat(i18n): pull 'drm' or 'simpledrm' module unless excluded
Some graphic cards require the 'drm' module to be present to be able to setup the console font (e.g. 'i915' requires it). Also avoid conflicts of 'drm' with 'simpledrm' module. Signed-off-by: Renaud Métrich <rmetrich@redhat.com> Co-authored-by: Renaud Métrich <rmetrich@redhat.com> (cherry picked from commit d56b581f3ed3e788d8950cce710c6733a08e9d23) Resolves: RHEL-145135
1 parent 7607265 commit 35e125e

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

modules.d/10i18n/module-setup.sh

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,28 @@ check() {
1111

1212
# called by dracut
1313
depends() {
14-
return 0
14+
# Include "drm" / "simpledrm" to be able to set the console font properly
15+
local _module _drm
16+
local -a _modules=(drm simpledrm)
17+
18+
for _module in "${_modules[@]}"; do
19+
if dracut_module_included "$_module"; then
20+
_drm="$_module"
21+
break
22+
fi
23+
done
24+
25+
if [[ -z $_drm ]]; then
26+
for _module in "${_modules[@]}"; do
27+
module_check "$_module" > /dev/null 2>&1
28+
if [[ $? == 255 ]] && ! [[ " $omit_dracutmodules " == *\ $_module\ * ]]; then
29+
_drm="$_module"
30+
break
31+
fi
32+
done
33+
fi
34+
35+
echo "$_drm"
1536
}
1637

1738
# called by dracut

0 commit comments

Comments
 (0)