From 980e24a24f77dc4ca77c373f0efb7f68d2604af8 Mon Sep 17 00:00:00 2001 From: Lichen Liu Date: Tue, 4 Nov 2025 12:19:49 +0800 Subject: [PATCH] kdump.sh: Strip the surrounding quotes from configuration values commit 1a733872(Strip surrounding quotes from configuration values) omitted modifications to kdump.sh. Adds a POSIX-compliant `case` statement to remove the surrounding quotes. Assisted-by: Google Gemini Signed-off-by: Lichen Liu --- dracut/99kdumpbase/kdump.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dracut/99kdumpbase/kdump.sh b/dracut/99kdumpbase/kdump.sh index 7c4c71ce..264e682c 100755 --- a/dracut/99kdumpbase/kdump.sh +++ b/dracut/99kdumpbase/kdump.sh @@ -48,7 +48,14 @@ kdump_read_conf > $KDUMP_CONF_PARSED get_kdump_confs() { while read -r config_opt config_val; do - # remove inline comments after the end of a directive. + # Variable starts and ends with a quote, remove them + case "$config_val" in + \"*\") + config_val="${config_val#?}" # Remove the first character + config_val="${config_val%?}" # Remove the last character + ;; + esac + case "$config_opt" in path) KDUMP_PATH="$config_val"