fix broken extra_bins when installing multiple binaries

When there more than one binaries, quoting "$val" would make
dracut-install treat multiple binaries as one binary. Take
"extra_bins /usr/sbin/ping /usr/sbin/ip" as an example, the
following error would occur when building initrd,

dracut-install: ERROR: installing '/usr/sbin/ping /usr/sbin/ip'
dracut: FAILED: /usr/lib/dracut/dracut-install -D /var/tmp/dracut.ODrioZ/initramfs -a /usr/sbin/ping /usr/sbin/ip

Fix it by not quoting the variable and bypassing SC2086 shellcheck.

Fixes: commit 86538ca6e2
       ("bash scripts: fix variable quoting issue")

Acked-by: Tao Liu <ltao@redhat.com>
Signed-off-by: Coiby Xu <coxu@redhat.com>
This commit is contained in:
Coiby Xu 2021-11-01 14:13:16 +08:00
parent 727251e52e
commit 6936fbc1b2

View File

@ -686,7 +686,8 @@ kdump_install_conf() {
fi fi
;; ;;
kdump_pre | kdump_post | extra_bins) kdump_pre | kdump_post | extra_bins)
dracut_install "$_val" # shellcheck disable=SC2086
dracut_install $_val
;; ;;
core_collector) core_collector)
dracut_install "${_val%%[[:blank:]]*}" dracut_install "${_val%%[[:blank:]]*}"