[systemd-devel] [PATCH] localed: search locale settings on kernel cmdline first

Lennart Poettering lennart at poettering.net
Mon Jun 30 06:10:06 PDT 2014


On Mon, 02.06.14 18:03, Michal Sekletar (msekleta at redhat.com) wrote:

Heya!

Sorry for the late response!

> systemd spawns services with locale settings taken from kernel
> cmdline. If it doesn't find anything there, then it proceeds with
> parsing settings from /etc/locale.conf.  localed should do the same and
> look at kernel cmdline first.

Hmm, this would create the weird situation where changing the settings
with localectl would have no effect on the settings it displays, right?

It's a weird thing: on one hand we want the rule that kernel cmdline
args override configuration in /etc. On the other we want that
localectl to be both getter and setter for the settings, and connect
them directly. Of course localectl cannot change the kernel cmdline.

We could make localed refuse changing the settings if there's something
on the kernel cmdline, but I think I'd hate that, since the admin should
always be able to change the settings.

Maybe another option is to improve localectl on the client side to
simply warn the user if there's something on the kernel cmdline
specified? (this check should probably test this directly, bypassing
localed, and thus get skipped if localectl is used on a remote host).

i.e. just a simple warning if you type "localectl" that says: "Warning:
Locale configuration has been specified on the kernel command line,
overriding the system settings below." or so...

Opinions?

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list