kdump-collect/module-setup: Mimic the regular kdump folder structure

Currently, for no reason we have a different folder structure in
the kdump initrd compared to the installed package. Change it here,
so both directories' structure match now.

We also changed the copy command for the config files, removing
some unnecessary quotes.

Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
This commit is contained in:
Guilherme G. Piccoli
2022-11-25 17:07:13 -03:00
parent 87b2ae9de6
commit 0081681565
2 changed files with 16 additions and 17 deletions

View File

@ -25,20 +25,6 @@ install() {
exit 1
fi
# First clear all unnecessary firmwares/drivers added by drm in order to
# reduce the size of this minimal initramfs being created. This should
# be already done via command-line arguments, but let's play safe and delete
# from here as well just in case.
rm -rf "$initdir"/usr/lib/firmware/amdgpu/
rm -rf "$initdir"/usr/lib/modules/*/kernel/drivers/gpu/drm/amd/*
# Install necessary binaries
inst date
inst sync
inst makedumpfile
mkdir -p "$initdir"/usr/lib/kdump/conf
# Load the necessary external variables, otherwise it'll fail later.
HAVE_CFG_FILES=0
shopt -s nullglob
@ -55,7 +41,20 @@ install() {
exit 1
fi
cp -LR --preserve=all "/usr/share/kdump.d"/* "$initdir"/usr/lib/kdump/conf/
# First clear all unnecessary firmwares/drivers added by drm in order to
# reduce the size of this minimal initramfs being created. This should
# be already done via command-line arguments, but let's play safe and delete
# from here as well just in case.
rm -rf "$initdir"/usr/lib/firmware/amdgpu/
rm -rf "$initdir"/usr/lib/modules/*/kernel/drivers/gpu/drm/amd/*
# Install necessary binaries
inst date
inst sync
inst makedumpfile
mkdir -p "$initdir"/usr/share/kdump.d/
cp -LR --preserve=all /usr/share/kdump.d/* "$initdir"/usr/share/kdump.d/
# Determine the numerical devnode for kdump, and save it on initrd;
# notice that partset link is not available that early in boot time.