[systemd-devel] Inconsistent processing of 'debug' and 'systemd.log_level' options from kernel command line

Lennart Poettering lennart at poettering.net
Fri Aug 15 09:17:05 PDT 2014


On Tue, 01.07.14 23:47, Mike Gilbert (floppym at gentoo.org) wrote:

> I have noticed that when the 'debug' option is passed on the kernel
> command line, it is impossible to override this using the
> 'systemd.log_level' option.
> 
> I also note that passing SYSTEMD_LOG_LEVEL on the kernel command line
> DOES work; the kernel copies this to the environment block for init.
> 
> Looking through the code, it looks like the 'debug' option is
> processed twice by systemd[1] in src/core/main.c:
> 
> 1. In parse_proc_cmdline(), 'debug' processed along with all other
> kernel command line options including 'systemd.log_level'.
> 
> 2. In log_parse_environment(), 'debug' is processed, but
> systemd.log_level is ignored.
> 
> Is this a bug? It seems quite strange.

Yeah, I fucked that one up, as it appears. Fixed now.

(It was even worse that that, we ended up parsing these kernel cmdline
options three times, in the worst case, not just two...)

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list