From 112d3e18912fd7fb32a12e9e0940893aec4ace14 Mon Sep 17 00:00:00 2001 From: Lichen Liu Date: Jun 17 2022 03:05:48 +0000 Subject: kdump-lib: fix typo in variable name Resolves: bz2076425 Upstream: Fedora Conflict: None commit aa9bb8f8cef734fb1f6ab36ccaaa8936edb4f467 Author: Philipp Rudo Date: Fri Mar 25 15:46:59 2022 +0100 kdump-lib: fix typo in variable name in prepare_kdump_bootinfo s/defaut/default/. While at it declare it with the other local variables as local. Signed-off-by: Philipp Rudo Reviewed-by: Tao Liu Reviewed-by: Coiby Xu Signed-off-by: Lichen Liu --- diff --git a/kdump-lib.sh b/kdump-lib.sh index 2442ab7..099cbfb 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -640,7 +640,7 @@ prepare_kexec_args() prepare_kdump_bootinfo() { local boot_img boot_imglist boot_dirlist boot_initrdlist - local machine_id + local machine_id dir img default_initrd_base var_target_initrd_dir if [[ -z $KDUMP_KERNELVER ]]; then KDUMP_KERNELVER="$(uname -r)" @@ -677,8 +677,8 @@ prepare_kdump_bootinfo() boot_initrdlist="initramfs-$KDUMP_KERNELVER.img initrd" for initrd in $boot_initrdlist; do if [[ -f "$KDUMP_BOOTDIR/$initrd" ]]; then - defaut_initrd_base="$initrd" - DEFAULT_INITRD="$KDUMP_BOOTDIR/$defaut_initrd_base" + default_initrd_base="$initrd" + DEFAULT_INITRD="$KDUMP_BOOTDIR/$default_initrd_base" break fi done @@ -686,12 +686,12 @@ prepare_kdump_bootinfo() # Create kdump initrd basename from default initrd basename # initramfs-5.7.9-200.fc32.x86_64.img => initramfs-5.7.9-200.fc32.x86_64kdump.img # initrd => initrdkdump - if [[ -z $defaut_initrd_base ]]; then + if [[ -z $default_initrd_base ]]; then kdump_initrd_base=initramfs-${KDUMP_KERNELVER}kdump.img - elif [[ $defaut_initrd_base == *.* ]]; then - kdump_initrd_base=${defaut_initrd_base%.*}kdump.${DEFAULT_INITRD##*.} + elif [[ $default_initrd_base == *.* ]]; then + kdump_initrd_base=${default_initrd_base%.*}kdump.${DEFAULT_INITRD##*.} else - kdump_initrd_base=${defaut_initrd_base}kdump + kdump_initrd_base=${default_initrd_base}kdump fi # Place kdump initrd in $(/var/lib/kdump) if $(KDUMP_BOOTDIR) not writable