kdump-lib: fix typo in variable name
Resolves: bz2076425
Upstream: Fedora
Conflict: None
commit aa9bb8f8ce
Author: Philipp Rudo <prudo@redhat.com>
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 <prudo@redhat.com>
Reviewed-by: Tao Liu <ltao@redhat.com>
Reviewed-by: Coiby Xu <coxu@redhat.com>
Signed-off-by: Lichen Liu <lichliu@redhat.com>
This commit is contained in:
parent
a743eaeded
commit
112d3e1891
14
kdump-lib.sh
14
kdump-lib.sh
@ -640,7 +640,7 @@ prepare_kexec_args()
|
|||||||
prepare_kdump_bootinfo()
|
prepare_kdump_bootinfo()
|
||||||
{
|
{
|
||||||
local boot_img boot_imglist boot_dirlist boot_initrdlist
|
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
|
if [[ -z $KDUMP_KERNELVER ]]; then
|
||||||
KDUMP_KERNELVER="$(uname -r)"
|
KDUMP_KERNELVER="$(uname -r)"
|
||||||
@ -677,8 +677,8 @@ prepare_kdump_bootinfo()
|
|||||||
boot_initrdlist="initramfs-$KDUMP_KERNELVER.img initrd"
|
boot_initrdlist="initramfs-$KDUMP_KERNELVER.img initrd"
|
||||||
for initrd in $boot_initrdlist; do
|
for initrd in $boot_initrdlist; do
|
||||||
if [[ -f "$KDUMP_BOOTDIR/$initrd" ]]; then
|
if [[ -f "$KDUMP_BOOTDIR/$initrd" ]]; then
|
||||||
defaut_initrd_base="$initrd"
|
default_initrd_base="$initrd"
|
||||||
DEFAULT_INITRD="$KDUMP_BOOTDIR/$defaut_initrd_base"
|
DEFAULT_INITRD="$KDUMP_BOOTDIR/$default_initrd_base"
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
@ -686,12 +686,12 @@ prepare_kdump_bootinfo()
|
|||||||
# Create kdump initrd basename from default initrd basename
|
# 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
|
# initramfs-5.7.9-200.fc32.x86_64.img => initramfs-5.7.9-200.fc32.x86_64kdump.img
|
||||||
# initrd => initrdkdump
|
# initrd => initrdkdump
|
||||||
if [[ -z $defaut_initrd_base ]]; then
|
if [[ -z $default_initrd_base ]]; then
|
||||||
kdump_initrd_base=initramfs-${KDUMP_KERNELVER}kdump.img
|
kdump_initrd_base=initramfs-${KDUMP_KERNELVER}kdump.img
|
||||||
elif [[ $defaut_initrd_base == *.* ]]; then
|
elif [[ $default_initrd_base == *.* ]]; then
|
||||||
kdump_initrd_base=${defaut_initrd_base%.*}kdump.${DEFAULT_INITRD##*.}
|
kdump_initrd_base=${default_initrd_base%.*}kdump.${DEFAULT_INITRD##*.}
|
||||||
else
|
else
|
||||||
kdump_initrd_base=${defaut_initrd_base}kdump
|
kdump_initrd_base=${default_initrd_base}kdump
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Place kdump initrd in $(/var/lib/kdump) if $(KDUMP_BOOTDIR) not writable
|
# Place kdump initrd in $(/var/lib/kdump) if $(KDUMP_BOOTDIR) not writable
|
||||||
|
Loading…
Reference in New Issue
Block a user