From 0098b5d9f30f9611557e61f2b75914ea3322b880 Mon Sep 17 00:00:00 2001 From: Lianbo Jiang Date: Thu, 12 Nov 2020 23:55:41 +0800 Subject: [PATCH] Capitalize the configuration name of log level In the /etc/sysconfig/kdump, we usually use the uppercase configuration name for all options. So let's use the same method to handle this. Signed-off-by: Lianbo Jiang Acked-by: Kairui Song --- kdump-logger.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/kdump-logger.sh b/kdump-logger.sh index 6d214af..370e5e8 100755 --- a/kdump-logger.sh +++ b/kdump-logger.sh @@ -35,6 +35,11 @@ # required variables. Don't call any other logging function before that one! # +# Define vairables for the log levels in this module. +kdump_stdloglvl="" +kdump_sysloglvl="" +kdump_kmsgloglvl="" + # The dracut-lib.sh is only available in the second kernel, and it won't # be used in the first kernel because the dracut-lib.sh is invisible in # the first kernel. @@ -88,6 +93,10 @@ dlog_init() { fi kdump_stdloglvl=0 kdump_kmsgloglvl=0 + else + kdump_stdloglvl=$KDUMP_STDLOGLVL + kdump_sysloglvl=$KDUMP_SYSLOGLVL + kdump_kmsgloglvl=$KDUMP_KMSGLOGLVL fi [ -z "$kdump_stdloglvl" ] && kdump_stdloglvl=3