Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 174071
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo X packagers <x11@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: David Brigada <brigad@rpi.edu>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
xdm.diff Patch to fix cmdline_opt function patch David Brigada 2007-04-10 19:10 0000 222 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 174071 depends on: Show dependency tree
Bug 174071 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-04-10 19:09 0000
If I boot my computer, the xdm init script acts as though it saw "nox" on the
kernel boot command line.  The cmdline_opt function doesn't return 1 if it
doesn't find the nox option, so the script thinks it's there even though it
isn't.  The simple fix is to add a return 1 at the end of the cmdline_opt
script for the case where it doesn't find the parameter.

------- Comment #1 From David Brigada 2007-04-10 19:10:08 0000 -------
Created an attachment (id=115923) [details]
Patch to fix cmdline_opt function

This fixes the issue

------- Comment #2 From Donnie Berkholz 2007-04-10 20:16:18 0000 -------
I suppose that means the previous command returned some wonky value, so that's
what the function ends up returning.

------- Comment #3 From David Brigada 2007-04-10 23:46:41 0000 -------
(In reply to comment #2)
> I suppose that means the previous command returned some wonky value, so that's
> what the function ends up returning.
> 

Well, if you have no arguments for the for command, then the for command
succeeds, and the function implicitly returns 0 (true).  If you have arguments,
but they don't match, the function implicitly returns 1 (false).  If you have
arguments that do match, the function explicitly runs the return 0.

I guess it's just kind of a particular of how shell scripting works.  I think
the cmdline_opt function works properly as long as the user has at least one
boot option, but fails if he doesn't.  This patch should fix the behavior for
all.

------- Comment #4 From Jakub Moc (RETIRED) 2007-04-11 07:05:29 0000 -------
(In reply to comment #3)

> the cmdline_opt function works properly as long as the user has at least one
> boot option, but fails if he doesn't.  This patch should fix the behavior for
> all.

Well no, it doesn't work at all currently, xdm is never started.

$ cat /proc/cmdline 
root=/dev/hda9 root=/dev/ram0 init=/linuxrc real_root=/dev/hda9
video=vesafb:ywrap,mtrr,1024x768-24@100 splash=silent,theme:livecd-2006.1
CONSOLE=/dev/tty1 quiet fbcon=scrollback:128K hde=noprobe hdf=noprobe
hdg=noprobe hdh=noprobe elevator=cfq

------- Comment #5 From Jakub Moc (RETIRED) 2007-04-12 20:46:55 0000 -------
*** Bug 174271 has been marked as a duplicate of this bug. ***

------- Comment #6 From Roy Marples (RETIRED) 2007-04-13 08:23:10 0000 -------
Fixed in -r3, sorry about that.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug