When the system has problems booting (like corrupted /var/lib/init.d in my case), Gentoo has the ability to fall back to a simple shell to fix the error. For that it prompts for the root password. I, being an user of the dreaded German keyboard layout, am using some chars I don't know the American layout equivalent of. Even looking them up and trying to type them in fails for some reason. So, there's no other option but to boot another OS to fix the problem. Incredibly annoying. How to fix? Make sure the keymaps service is loaded before prompting for the password to ensure that the user's keyboard layout is loaded.
I suppose that we should have a toggle in /etc/rc.conf - rc_secure_shell=YES/NO and document what happens if set to YES. We should default it to NO as there is no guarantee user has correct keymap loaded even if the keymaps service starts.
http://roy.marples.name/projects/openrc/changeset/1553/trunk We no longer drop to sulogin by default. This is configurable by setting rc_shell in /etc/rc.conf
Thanks for fixing. What exactly does this mean? What does it drop to instead? It does support the user's layout by default, right?
(In reply to comment #3) > Thanks for fixing. > What exactly does this mean? What does it drop to instead? By default it just drops to /bin/sh, or whatever rc_shell is set to in /etc/rc.conf > It does support the user's layout by default, right? Only if it's loaded by that point, which is not always the case. It maybe preferable to build the keymap into the kernel directly if that's possible.
I guess the "fix" here is that you can see what you're typing as there's no longer a password to enter by default. We also cannot load the keymap by default either as it could be corrupt and make things worse or not even available.
Ah, I see. So we essentially replaced the passworded login with a non-password one? That's not exactly having the cake and eating it too :) How about a prompt after sulogin/sh asking whether the user wants to load his/her keymap?
Hmm, this code is only called when the user requests a shell during an interactive startup. At no other point do we drop to a shell. So if the user decides to drop to shell before keymap has loaded it's his/her choice. With baselayout-1, sulogin was called in a lot of other places (like maybe say with your /var/lib/init.d corruption), and this is no longer the case. OpenRC is also more ressilient things like this. In other words, if you don't think my fix is enough for you, then you'll need to find a way of loading the keymap before OpenRC starts (possible) or build it into the kernel (dunno if this is possible). The final alternative is to open a new bug at http://roy.marples.name/projects/openrc asking if it's possible to save the last loaded correct keyboard mapping by the keymaps script and load it before OpenRC starts on next boot. We do the same with the consolefont, so it maybe possible.