Skip to content

Commit

Permalink
Merge pull request #227 from valentindavid/valentindavid/fix-module-n…
Browse files Browse the repository at this point in the history
…ame-walking

ubuntu-core-initramfs: Fix discovery of compressed modules
  • Loading branch information
Meulengracht committed Jan 9, 2024
2 parents bd110f4 + 41b9e14 commit 12b79fb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions bin/ubuntu-core-initramfs
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,13 @@ class ModuleDb:

for root, dirs, files in os.walk(module_path):
for f in files:
name, ext = os.path.splitext(f)
if ext == '.ko':
self._modules[name] = ModuleDb.ModuleInfo(False, [], [])
if f.endswith('.ko'):
name, _ = os.path.splitext(f)
elif '.ko.' in f:
name, _ = f.split('.ko.', maxsplit=1)
else:
continue
self._modules[name] = ModuleDb.ModuleInfo(False, [], [])

for alias, target in ModuleDb.__each_alias(os.path.join(module_path, "modules.alias")):
try:
Expand Down

0 comments on commit 12b79fb

Please sign in to comment.