dracut-early-kdump: fix shellcheck findings
Fix the following issues found by shellcheck. For the second one disable shellcheck as EARLY_KEXEC_ARGS can contain multiple arguments. In dracut-early-kdump.sh line 9: EARLY_KDUMP_KERNELVER="" ^-------------------^ SC2034: EARLY_KDUMP_KERNELVER appears unused. Verify use (or export if used externally). In dracut-early-kdump.sh line 61: if $KEXEC $EARLY_KEXEC_ARGS $standard_kexec_args \ ^---------------^ SC2086: Double quote to prevent globbing and word splitting. For more information: https://www.shellcheck.net/wiki/SC2034 https://www.shellcheck.net/wiki/SC2086 Signed-off-by: Philipp Rudo <prudo@redhat.com> Reviewed-by: Coiby Xu <coxu@redhat.com>
This commit is contained in:
parent
d5faaee62b
commit
0578245746
@ -6,7 +6,6 @@ standard_kexec_args="-p"
|
|||||||
EARLY_KDUMP_INITRD=""
|
EARLY_KDUMP_INITRD=""
|
||||||
EARLY_KDUMP_KERNEL=""
|
EARLY_KDUMP_KERNEL=""
|
||||||
EARLY_KDUMP_CMDLINE=""
|
EARLY_KDUMP_CMDLINE=""
|
||||||
EARLY_KDUMP_KERNELVER=""
|
|
||||||
EARLY_KEXEC_ARGS=""
|
EARLY_KEXEC_ARGS=""
|
||||||
|
|
||||||
. /etc/sysconfig/kdump
|
. /etc/sysconfig/kdump
|
||||||
@ -58,6 +57,7 @@ early_kdump_load()
|
|||||||
--command-line=$EARLY_KDUMP_CMDLINE --initrd=$EARLY_KDUMP_INITRD \
|
--command-line=$EARLY_KDUMP_CMDLINE --initrd=$EARLY_KDUMP_INITRD \
|
||||||
$EARLY_KDUMP_KERNEL"
|
$EARLY_KDUMP_KERNEL"
|
||||||
|
|
||||||
|
# shellcheck disable=SC2086
|
||||||
if $KEXEC $EARLY_KEXEC_ARGS $standard_kexec_args \
|
if $KEXEC $EARLY_KEXEC_ARGS $standard_kexec_args \
|
||||||
--command-line="$EARLY_KDUMP_CMDLINE" \
|
--command-line="$EARLY_KDUMP_CMDLINE" \
|
||||||
--initrd=$EARLY_KDUMP_INITRD $EARLY_KDUMP_KERNEL; then
|
--initrd=$EARLY_KDUMP_INITRD $EARLY_KDUMP_KERNEL; then
|
||||||
|
Loading…
Reference in New Issue
Block a user