all: Rename the tool to kdumpst

Big but self-explanatory commit: rename the tool. The name choice was
kdumpst, since it's a tool to enable both kdump and pstore setting, also
it's a silly wordplay with the superlative of kdump, as in "kdumpest".

It's an invasive change (touches most of the files), but should
offer no functional change other than logging messages showing
kdumpst now, instead of kdump, and some filenames.

Notice it doesn't touch documentation, which will be done in
a subsequent commit.

Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
This commit is contained in:
Guilherme G. Piccoli
2023-03-22 20:08:47 -03:00
parent 756e698650
commit 4b5746a60e
19 changed files with 98 additions and 98 deletions

View File

@ -4,7 +4,7 @@ check() {
}
installkernel() {
load_kdump_config
load_kdumpst_config
# First clear all unnecessary firmwares/drivers added by drm in order
# to reduce the size of the minimal initramfs being created - kdump
@ -16,7 +16,7 @@ installkernel() {
FSMOD="$(findmnt -n -o FSTYPE --target "${MOUNT_FOLDER}")"
if [ -z "${FSMOD}" ]; then
logger "kdump: error on filesystem discovery"
logger "kdumpst: error on filesystem discovery"
exit 1
fi
@ -39,38 +39,38 @@ installkernel() {
install() {
# A valid makedumpfile is essential for the kdump initrd creation.
if ! command -v makedumpfile 1>/dev/null; then
logger "kdump: failed to create dracut initrd, makedumpfile is missing"
logger "kdumpst: failed to create dracut initrd, makedumpfile is missing"
exit 1
fi
load_kdump_config
load_kdumpst_config
# Install necessary binaries
inst date
inst sync
inst makedumpfile
# Copying kdump config/lib files is essential for a functional kdump.
cp -LR --preserve=all /usr/share/kdump.d/ "$initdir"/usr/share/
cp -LR --preserve=all /usr/lib/kdump/ "$initdir"/usr/lib/
# Copying kdumpst config/lib files is essential for a functional kdump.
cp -LR --preserve=all /usr/share/kdumpst.d/ "$initdir"/usr/share/
cp -LR --preserve=all /usr/lib/kdumpst/ "$initdir"/usr/lib/
# Finally, we need to derive the proper place to save the dump from the
# config files, in a way that makes possible to mount it in early boot.
DEVNODE="$(findmnt -n -o SOURCE --target "${MOUNT_FOLDER}")"
if [ -z "${DEVNODE}" ]; then
logger "kdump: error on devnode discovery"
logger "kdumpst: error on devnode discovery"
exit 1
fi
echo "${DEVNODE}" > "$initdir"/usr/lib/kdump/kdump.mnt
echo "${DEVNODE}" > "$initdir"/usr/lib/kdumpst/kdump.mnt
TGT="$(findmnt -n -o TARGET --target "${MOUNT_FOLDER}")"
if [ -z "${TGT}" ]; then
logger "kdump: error on base folder discovery"
logger "kdumpst: error on base folder discovery"
exit 1
fi
BASE_FLD="${MOUNT_FOLDER#*$TGT}"
echo "${BASE_FLD}" > "$initdir"/usr/lib/kdump/kdump.dir
echo "${BASE_FLD}" > "$initdir"/usr/lib/kdumpst/kdump.dir
inst_hook pre-mount 01 "$moddir/kdump-collect.sh"
}