mirror of
https://github.com/systemd/systemd
synced 2024-09-06 16:56:43 +00:00
core: Parse logging environment earlier
Let's make sure we parse the logging environment ASAP so that the options apply to more code. e.g. to allow debugging kmod-setup.c for example.
This commit is contained in:
parent
e1d8f702a2
commit
d2f57745d5
|
@ -2798,12 +2798,18 @@ int main(int argc, char *argv[]) {
|
|||
error_message = "Failed to mount early API filesystems";
|
||||
goto finish;
|
||||
}
|
||||
}
|
||||
|
||||
/* Let's open the log backend a second time, in case the first time didn't
|
||||
* work. Quite possibly we have mounted /dev just now, so /dev/kmsg became
|
||||
* available, and it previously wasn't. */
|
||||
log_open();
|
||||
/* We might have just mounted /proc, so let's try to parse the kernel
|
||||
* command line log arguments immediately. */
|
||||
log_parse_environment();
|
||||
|
||||
/* Let's open the log backend a second time, in case the first time didn't
|
||||
* work. Quite possibly we have mounted /dev just now, so /dev/kmsg became
|
||||
* available, and it previously wasn't. */
|
||||
log_open();
|
||||
|
||||
if (!skip_setup) {
|
||||
disable_printk_ratelimit();
|
||||
|
||||
r = initialize_security(
|
||||
|
|
Loading…
Reference in a new issue