From 203af7302854f453fa4a05ecefd4403b6c8a4f8d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 26 Aug 2024 12:33:11 +0200 Subject: Adding upstream version 103. Signed-off-by: Daniel Baumann --- dracut-logger.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'dracut-logger.sh') diff --git a/dracut-logger.sh b/dracut-logger.sh index 1a57e5e..64eb5f5 100755 --- a/dracut-logger.sh +++ b/dracut-logger.sh @@ -179,33 +179,40 @@ dlog_init() { if ((stdloglvl < 6)) && ((kmsgloglvl < 6)) && ((fileloglvl < 6)) && ((sysloglvl < 6)); then unset dtrace + # shellcheck disable=SC2317 # exposed via API dtrace() { :; } fi if ((stdloglvl < 5)) && ((kmsgloglvl < 5)) && ((fileloglvl < 5)) && ((sysloglvl < 5)); then unset ddebug + # shellcheck disable=SC2317 # exposed via API ddebug() { :; } fi if ((stdloglvl < 4)) && ((kmsgloglvl < 4)) && ((fileloglvl < 4)) && ((sysloglvl < 4)); then unset dinfo + # shellcheck disable=SC2317 # exposed via API dinfo() { :; } fi if ((stdloglvl < 3)) && ((kmsgloglvl < 3)) && ((fileloglvl < 3)) && ((sysloglvl < 3)); then unset dwarn + # shellcheck disable=SC2317 # exposed via API dwarn() { :; } unset dwarning + # shellcheck disable=SC2317 # exposed via API dwarning() { :; } fi if ((stdloglvl < 2)) && ((kmsgloglvl < 2)) && ((fileloglvl < 2)) && ((sysloglvl < 2)); then unset derror + # shellcheck disable=SC2317 # exposed via API derror() { :; } fi if ((stdloglvl < 1)) && ((kmsgloglvl < 1)) && ((fileloglvl < 1)) && ((sysloglvl < 1)); then unset dfatal + # shellcheck disable=SC2317 # exposed via API dfatal() { :; } fi @@ -327,7 +334,7 @@ _do_dlog() { if ((lvl <= sysloglvl)); then if [[ "$_dlogfd" ]]; then - printf -- "<%s>%s\n" "$(($(_dlvl2syslvl "$lvl") & 7))" "$msg" >&$_dlogfd + printf -- "<%s>%s\n" "$(($(_dlvl2syslvl "$lvl") & 7))" "$msg" >&"$_dlogfd" else logger -t "dracut[$$]" -p "$(_lvl2syspri "$lvl")" -- "$msg" fi -- cgit v1.2.3