dracut-module-setup.sh: use "*" to expend array as string

upstream: fedora
resolves: bz2003832
conflict: none

commit da3ad9cbdaa332ed9384799e4b3198b9e55c5cd3
Author: Kairui Song <kasong@redhat.com>
Date:   Wed Aug 4 15:47:43 2021 +0800

    dracut-module-setup.sh: use "*" to expend array as string

    As suggested by:
    https://github.com/koalaman/shellcheck/wiki/SC2199
    The array is not quoted here but implicitly concatenate still happens,
    could be harmless but shellcheck complains about it so fix 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:44:30 +08:00
parent c0cbd45726
commit c8faddc4f8
1 changed files with 1 additions and 1 deletions

View File

@ -94,7 +94,7 @@ kdump_setup_dns() {
_tmp=$(get_nmcli_value_by_field "$_nm_show_cmd" "IP4.DNS")
array=(${_tmp//|/ })
if [[ ${array[@]} ]]; then
if [[ ${array[*]} ]]; then
for _dns in "${array[@]}"
do
echo "nameserver=$_dns" >> "$_dnsfile"