summaryrefslogtreecommitdiffstats
path: root/src/shutdown
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-07-12 10:41:28 +0200
committerLennart Poettering <lennart@poettering.net>2019-07-13 11:05:07 +0200
commit9a75c652488bfe425958e367a15bc1dd8d1bd82c (patch)
tree5acd092a3fd30a0aa11c0b82f215900d1982f3cf /src/shutdown
parentshutdown: rework bump_sysctl_printk_log_level() to use sysctl_writef() (diff)
downloadsystemd-9a75c652488bfe425958e367a15bc1dd8d1bd82c.tar.xz
systemd-9a75c652488bfe425958e367a15bc1dd8d1bd82c.zip
shutdown: bump kmsg log level to LOG_WARNING only
Fixes: #12337
Diffstat (limited to 'src/shutdown')
-rw-r--r--src/shutdown/shutdown.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/shutdown/shutdown.c b/src/shutdown/shutdown.c
index 3c6aed1121..45f3461547 100644
--- a/src/shutdown/shutdown.c
+++ b/src/shutdown/shutdown.c
@@ -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");