Skip to content

Commit 6a54338

Browse files
committed
kdump.sh: Strip the surrounding quotes from configuration values
commit 1a73387(Strip surrounding quotes from configuration values) omitted modifications to kdump.sh. Adds a POSIX-compliant `case` statement to remove the surrounding quotes. Signed-off-by: Lichen Liu <[email protected]>
1 parent e44958c commit 6a54338

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

dracut/99kdumpbase/kdump.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,14 @@ kdump_read_conf > $KDUMP_CONF_PARSED
4848

4949
get_kdump_confs() {
5050
while read -r config_opt config_val; do
51-
# remove inline comments after the end of a directive.
51+
# Variable starts and ends with a quote, remove them
52+
case "$config_val" in
53+
\"*\")
54+
config_val="${config_val#?}" # Remove the first character
55+
config_val="${config_val%?}" # Remove the last character
56+
;;
57+
esac
58+
5259
case "$config_opt" in
5360
path)
5461
KDUMP_PATH="$config_val"

0 commit comments

Comments
 (0)