From da3ad9cbdaa332ed9384799e4b3198b9e55c5cd3 Mon Sep 17 00:00:00 2001 From: Kairui Song Date: Wed, 4 Aug 2021 15:47:43 +0800 Subject: [PATCH] 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 Acked-by: Philipp Rudo --- dracut-module-setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index 815abeb..3d465c4 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -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"