/etc/init.d/gdm check for 'text' in /proc/cmdline should not match within words
Bug #294980 reported by
Sundar Nagarajan
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gdm (Ubuntu) |
Fix Released
|
Low
|
Michael Vogt |
Bug Description
Line 49 of /etc/init.d/gdm checks for 'text' in kernel command line, and if present, does not start the Display Manager. However, the script does
grep -qs text /proc/cmdline
which will match anything on the kernel command line that includes 'text' (including a UUID, kernel image or initrd filename or any other kernel parameter including the string 'text'. This is probably not what is expected.
I suggest replacing line 49 to read as follows instead:
if grep -qsw text /proc/cmdline; then
This will match 'text' only as a separate word, and is probably what was intended.
Related branches
To post a comment you must log in.
thank you for your bug report, michael you did the change any opinion about that one?