Bug 174071 - x11-apps/xinit initscript reads nox falsely
|
Bug#:
174071
|
Product: Gentoo Linux
|
Version: unspecified
|
Platform: All
|
|
OS/Version: Linux
|
Status: RESOLVED
|
Severity: normal
|
Priority: P2
|
|
Resolution: FIXED
|
Assigned To: x11@gentoo.org
|
Reported By: brigad@rpi.edu
|
|
Component: Ebuilds
|
|
|
URL:
|
|
Summary: x11-apps/xinit initscript reads nox falsely
|
|
Keywords: Inclusion
|
|
Status Whiteboard:
|
|
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.
I suppose that means the previous command returned some wonky value, so that's
what the function ends up returning.
(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.
(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
*** Bug 174271 has been marked as a duplicate of this bug. ***
Fixed in -r3, sorry about that.