dracut-module-setup.sh: fix a ambiguous variable reference

upstream: fedora
resolves: bz2003832
conflict: none

commit dfe7555323
Author: Kairui Song <kasong@redhat.com>
Date:   Wed Aug 4 15:51:34 2021 +0800

    dracut-module-setup.sh: fix a ambiguous variable reference

    Wrap the variable with {...}, else it may get interpreted as array due
    to the '[' char next to it.

    Signed-off-by: Kairui Song <kasong@redhat.com>
    Acked-by: Philipp Rudo <prudo@redhat.com>

Signed-off-by: Tao Liu <ltao@redhat.com>
This commit is contained in:
Tao Liu 2021-11-03 15:45:41 +08:00
parent c8faddc4f8
commit 057e505536
1 changed files with 2 additions and 2 deletions

View File

@ -686,11 +686,11 @@ kdump_install_conf() {
case "$_opt" in
raw)
_pdev=$(persistent_policy="by-id" kdump_get_persistent_dev $_val)
sed -i -e "s#^$_opt[[:space:]]\+$_val#$_opt $_pdev#" ${initdir}/tmp/$$-kdump.conf
sed -i -e "s#^${_opt}[[:space:]]\+$_val#$_opt $_pdev#" ${initdir}/tmp/$$-kdump.conf
;;
ext[234]|xfs|btrfs|minix)
_pdev=$(kdump_get_persistent_dev $_val)
sed -i -e "s#^$_opt[[:space:]]\+$_val#$_opt $_pdev#" ${initdir}/tmp/$$-kdump.conf
sed -i -e "s#^${_opt}[[:space:]]\+$_val#$_opt $_pdev#" ${initdir}/tmp/$$-kdump.conf
;;
ssh|nfs)
kdump_install_net "$_val"