Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(dracut.sh): split drivers_dir check #2025

Merged
merged 1 commit into from
Dec 21, 2022

Conversation

aafeijoo-suse
Copy link
Member

The directory where to look for kernel modules can be set via the -k/--kmoddir command line option or the drivers_dir configuration option. Its current check should be split into two different ones to avoid misleading error messages (see #1608):

  • First check that its basename matches the kernel version set for the initramfs (via --kver or automatically set by uname -r).
  • Second check that the parent directory of the last provided directory contains "/lib/modules/". This check was also fixed to avoid accepting other directories like "xxxlib/modules".

Checklist

  • I have tested it locally
  • I have reviewed and updated any documentation if relevant
  • I am providing new code and test(s) for it

Fixes #1608

The directory where to look for kernel modules can be set via the -k/--kmoddir
command line option or the drivers_dir configuration option. Its current check
should be split into two different ones to avoid misleading error messages (see
referenced issue):
- First check that its basename matches the kernel version set for the initramfs
(via --kver or automatically set by "uname -r").
- Second check that the parent directory of the last provided directory contains
"/lib/modules/". This check was also fixed to avoid accepting other directories
like "xxxlib/modules".

Fixes issue dracutdevs#1608
@stale
Copy link

stale bot commented Nov 26, 2022

This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions.

@stale stale bot added the stale communication is stuck label Nov 26, 2022
@LaszloGombos LaszloGombos removed the stale communication is stuck label Nov 26, 2022
Copy link
Collaborator

@LaszloGombos LaszloGombos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@LaszloGombos LaszloGombos assigned johannbg and unassigned johannbg Nov 29, 2022
@johannbg johannbg merged commit d32d221 into dracutdevs:master Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dracut complains that --kmoddir /lib/modules/... doesn't have "/lib/modules" as a parent directory.
3 participants