mkfadumprd: make _dracut_isolate_args an array

upstream: fedora
resolves: bz2003832
conflict: none

commit 982205d607
Author: Kairui Song <kasong@redhat.com>
Date:   Wed Aug 4 03:06:57 2021 +0800

    mkfadumprd: make _dracut_isolate_args an array

    To make arguments list work as expected, array is preferred.

    Check following link for details:
    https://github.com/koalaman/shellcheck/wiki/SC2089

    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:40:15 +08:00
parent 1539061bbe
commit caa2405338

View File

@ -51,14 +51,17 @@ if ! (pushd "$MKFADUMPRD_TMPDIR/fadumproot" > /dev/null && lsinitrd --unpack "$F
fi
### Pack it into the normal boot initramfs with zz-fadumpinit module
_dracut_isolate_args="--rebuild $REBUILD_INITRD --add zz-fadumpinit \
-i $MKFADUMPRD_TMPDIR/fadumproot /fadumproot \
-i $MKFADUMPRD_TMPDIR/fadumproot/usr/lib/dracut/hostonly-kernel-modules.txt
/usr/lib/dracut/fadump-kernel-modules.txt"
_dracut_isolate_args=(\
--rebuild "$REBUILD_INITRD" --add zz-fadumpinit \
-i "$MKFADUMPRD_TMPDIR/fadumproot" /fadumproot
-i "$MKFADUMPRD_TMPDIR/fadumproot/usr/lib/dracut/hostonly-kernel-modules.txt"
/usr/lib/dracut/fadump-kernel-modules.txt
)
if is_squash_available; then
_dracut_isolate_args="$_dracut_isolate_args --add squash"
_dracut_isolate_args+=( --add squash )
fi
if ! dracut --force --quiet $_dracut_isolate_args $@ "$TARGET_INITRD"; then
if ! dracut --force --quiet "${_dracut_isolate_args[@]}" "$@" "$TARGET_INITRD"; then
perror_exit "mkfadumprd: failed to setup '$TARGET_INITRD' with dump capture capability"
fi