]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shutdown: bump kmsg log level to LOG_WARNING only
authorLennart Poettering <lennart@poettering.net>
Fri, 12 Jul 2019 08:41:28 +0000 (10:41 +0200)
committerLennart Poettering <lennart@poettering.net>
Sat, 13 Jul 2019 09:05:07 +0000 (11:05 +0200)
Fixes: #12337
src/shutdown/shutdown.c

index 3c6aed112196e9fefa383b8ddc72817b02c6a0b1..45f346154772853f8fed98045b880c8e3466c958 100644 (file)
@@ -344,15 +344,17 @@ int main(int argc, char *argv[]) {
         (void) cg_get_root_path(&cgroup);
         in_container = detect_container() > 0;
 
-        /* If the logging messages are going to KMSG, and if we are not running from a container,
-         * then try to update the sysctl kernel.printk current value in order to see "info" messages;
-         * This current log level is not updated if already big enough.
+        /* If the logging messages are going to KMSG, and if we are not running from a container, then try to
+         * update the sysctl kernel.printk current value in order to see "info" messages; This current log
+         * level is not updated if already big enough.
          */
-        if (!in_container && IN_SET(log_get_target(), LOG_TARGET_AUTO,
-                                                      LOG_TARGET_JOURNAL_OR_KMSG,
-                                                      LOG_TARGET_SYSLOG_OR_KMSG,
-                                                      LOG_TARGET_KMSG))
-                bump_sysctl_printk_log_level(LOG_INFO);
+        if (!in_container &&
+            IN_SET(log_get_target(),
+                   LOG_TARGET_AUTO,
+                   LOG_TARGET_JOURNAL_OR_KMSG,
+                   LOG_TARGET_SYSLOG_OR_KMSG,
+                   LOG_TARGET_KMSG))
+                bump_sysctl_printk_log_level(LOG_WARNING);
 
         use_watchdog = getenv("WATCHDOG_USEC");
         watchdog_device = getenv("WATCHDOG_DEVICE");