There are several oddities and breakish things in new xdm/xdm-setup init scripts. 0. "nox" option NO LONGER WORKS causing a total mess to already configured systems (it breaks backward compatibility), "gentoo=nox" seems the new way but please, keep compatibility with "nox" boot param. 1. xdm-setup sounds very useless, the only thing it does is touch a file if "gentoo=nox" is passed 2. xdm-setup touches a file in a very very bad place which is /etc/init.d/.noxdm which causes init scripts cache to be tained (bad performance impact) 3. xdm uses xdm-setup only for handing the "gentoo=nox" option, this sounds very mmmmmmmh... (mumble!) 4. xdm removes /etc/init.d/.noxdm afterwards (WTF all these complexity!) and makes the init script to fail if "gentoo=nox" is set (see line 133 => return 1), very insane to me Thanks. Reproducible: Always
Created attachment 204903 [details, diff] Fix >=x11-apps/xinit-1.0.8-r7 This patch does fix all BUT gentoo=nox (adding backward compatibility is up to you)
Created attachment 204904 [details, diff] Fix >=x11-apps/xinit-1.0.8-r7 (real patch) I erroneously attached a wrong patch ;)
Created attachment 204906 [details, diff] >=x11-apps/xinit-1.0.8-r7: critical fixes This patch only addresses critical issues found in init scripts
(In reply to comment #3) > Created an attachment (id=204906) [edit] > >=x11-apps/xinit-1.0.8-r7: critical fixes > > This patch only addresses critical issues found in init scripts I've applied this patch without the "return 0". @William, could you take a look? Thanks
"return 1" causes xdm to be marked as faulty and re-run in other runlevels (thus spawning your XDM, which is an unwanted behaviour when using gentoo=nox). Example: I have 3 runlevels (boot, mystuff, default). I place xdm in mystuff. xdm is started in mystuff and fails. When init enters into the "default" (last) runlevel, xdm is started again and this time, since ".noxdm" file has been already removed by xdm on the previous run XDM is started and thus the "gentoo=nox" option results broken. If you tried to fix other issues, these fixes, unfortunately, did more harm than good. It would be nice to have a list of fixed bugs here that have caused this "regression". Ready to help ;)
the reason for creating the .noxdm file in /etc/init.d is that is where the livecd-tools package creates it if nox is on the command line. In the current situation, the .noxdm file gets created in /etc/init.d if nox alone is on the command line and in / otherwise. Since the xdm init script only looks for the one in /, the livecd is now broken. See bug #156570 for a discussion about nox and gentoo=nox. Basically, nox without the gentoo= prefix is to be used on the livecd, and the gentoo=nox version has been adopted so that on a running system all of our gentoo specific boot options are consistent. The reason for using the .noxdm file is so that xdm can be restarted manually without forcing a reboot, which cannot happen if the xdm init script is looking at the kernel command line. I am also concerned about the new location of .noxdm in this patch. Wouldn't /tmp be a better location than /?
All, I partially reverted the patch due to the livecd-tools creating .noxdm in /etc/init.d. For now this needs to be consistent with the way the livecd-tools package works. Also, I made the change suggested in comment #5. Now the xdm setup script returns 0 when the .noxdm file was touched so that it is now marked as successfully started.
All, I need someone who is running X to do the following: 1) reboot with gentoo=nox on the command line so X doesn't start. 2) try to start X with /etc/init.d/xdm restart once you get to the shell. Does this work? Please report back what happens.
After talking with Remi on irc, I did another update. Now the xdm-setup script creates the .noxdm file in /tmp and the xdm script checks for it in /tmp and /etc/init.d so that it supports livecd-tools as well as the gentoo=nox option.
Thenk we can kill this ;)