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

Prevent grep from matching comment #43

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

brandon-pribula
Copy link

The lookkernel function searches for the pattern 'initrd' in /etc/lilo.conf to determine if the user has an initrd and if so displays the appropriate message. However, the grep command used in the 'if' statement at line 329 will always succeed even if the user doesn't have an initrd line in a kernel block in /etc/lilo.conf. This is due to grep matching a comment line which contains 'initrd' on line 9 of /etc/lilo.conf.

The new grep pattern will only match lines containing the string 'initrd=' which are preceded by zero or more white space starting from the beginning of the line, which will prevent matching commented lines.

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.

1 participant