Hi Philipp,
On Wed, Dec 21, 2022 at 04:27:14PM +0100, Philipp Rudo wrote:
>Fix the following issues found by shellcheck
>
>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(a)redhat.com>
>---
> dracut-early-kdump.sh | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
>diff --git a/dracut-early-kdump.sh b/dracut-early-kdump.sh
>index 45ee6dc..9e55258 100755
>--- a/dracut-early-kdump.sh
>+++ b/dracut-early-kdump.sh
>@@ -6,7 +6,6 @@ standard_kexec_args="-p"
> EARLY_KDUMP_INITRD=""
> EARLY_KDUMP_KERNEL=""
> EARLY_KDUMP_CMDLINE=""
>-EARLY_KDUMP_KERNELVER=""
> EARLY_KEXEC_ARGS=""
>
> . /etc/sysconfig/kdump
>@@ -58,7 +57,7 @@ early_kdump_load()
> --command-line=$EARLY_KDUMP_CMDLINE --initrd=$EARLY_KDUMP_INITRD \
> $EARLY_KDUMP_KERNEL"
>
>- if $KEXEC $EARLY_KEXEC_ARGS $standard_kexec_args \
>+ if $KEXEC "$EARLY_KEXEC_ARGS" $standard_kexec_args \
Since EARLY_KEXEC_ARGS could be multiple arguments, quoting it could
cause a trouble for kexec. So we should simply suppress the shellcheck
error instead.
> --command-line="$EARLY_KDUMP_CMDLINE" \
> --initrd=$EARLY_KDUMP_INITRD $EARLY_KDUMP_KERNEL; then
> dinfo "kexec: loaded early-kdump kernel"
>--
>2.38.1
>_______________________________________________
>kexec mailing list -- kexec(a)lists.fedoraproject.org
>To unsubscribe send an email to kexec-leave(a)lists.fedoraproject.org
>Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
>List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
>List Archives:
https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.org
>Do not reply to spam, report it:
https://pagure.io/fedora-infrastructure/new_issue