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>
30 lines
1001 B
Bash
30 lines
1001 B
Bash
# Functions to deal with initcpio specifics, both for building
|
|
# the initramfs for mkinitcpio users, but also with regards to
|
|
# installing its specific hooks.
|
|
#
|
|
# IMPORTANT: it is assumed that kdumpst configuration was loaded
|
|
# before running any of these functions!
|
|
#
|
|
create_initramfs_mkinitcpio() {
|
|
rm -f "${MOUNT_FOLDER}/kdump-initrd-$1.img"
|
|
|
|
mkinitcpio -A kdump -g "${MOUNT_FOLDER}/kdump-initrd-$1.img" "$1" 1>/dev/null
|
|
|
|
if [ -s "${MOUNT_FOLDER}/kdump-initrd-$1.img" ]; then
|
|
logger "kdumpst: created initcpio minimal initramfs"
|
|
fi
|
|
}
|
|
|
|
mkinitcpio_installation() {
|
|
KDUMP_HOOKS_DIR="/usr/lib/kdumpst/initcpio/"
|
|
INITCPIO_HOOKS="/usr/lib/initcpio/hooks"
|
|
INITCPIO_INST="/usr/lib/initcpio/install"
|
|
|
|
if [ ! -e "${INITCPIO_HOOKS}"/kdump ] || [ ! -e "${INITCPIO_INST}"/kdump ]; then
|
|
install -D -m0644 "${KDUMP_HOOKS_DIR}"/kdump.hook "${INITCPIO_HOOKS}"/kdump
|
|
install -D -m0644 "${KDUMP_HOOKS_DIR}"/kdump.install "${INITCPIO_INST}"/kdump
|
|
logger "kdumpst: initcpio hooks installed"
|
|
fi
|
|
}
|
|
|