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:
parent
1539061bbe
commit
caa2405338
15
mkfadumprd
15
mkfadumprd
@ -51,14 +51,17 @@ if ! (pushd "$MKFADUMPRD_TMPDIR/fadumproot" > /dev/null && lsinitrd --unpack "$F
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
### Pack it into the normal boot initramfs with zz-fadumpinit module
|
### Pack it into the normal boot initramfs with zz-fadumpinit module
|
||||||
_dracut_isolate_args="--rebuild $REBUILD_INITRD --add zz-fadumpinit \
|
_dracut_isolate_args=(\
|
||||||
-i $MKFADUMPRD_TMPDIR/fadumproot /fadumproot \
|
--rebuild "$REBUILD_INITRD" --add zz-fadumpinit \
|
||||||
-i $MKFADUMPRD_TMPDIR/fadumproot/usr/lib/dracut/hostonly-kernel-modules.txt
|
-i "$MKFADUMPRD_TMPDIR/fadumproot" /fadumproot
|
||||||
/usr/lib/dracut/fadump-kernel-modules.txt"
|
-i "$MKFADUMPRD_TMPDIR/fadumproot/usr/lib/dracut/hostonly-kernel-modules.txt"
|
||||||
|
/usr/lib/dracut/fadump-kernel-modules.txt
|
||||||
|
)
|
||||||
|
|
||||||
if is_squash_available; then
|
if is_squash_available; then
|
||||||
_dracut_isolate_args="$_dracut_isolate_args --add squash"
|
_dracut_isolate_args+=( --add squash )
|
||||||
fi
|
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"
|
perror_exit "mkfadumprd: failed to setup '$TARGET_INITRD' with dump capture capability"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user