kdump-steamos: Move configuration file out of /etc

This patch main goal is to "un-Debianize" the configuration file
for kdump-steamos - thanks Emil (@xexaxo) for the discussions; it
is with a bit of a heavy heart I do that, but let's comply with the
modern distros ;-)

We hereby put the config file in a more standard path: /usr/share.
Usually users could override that with /etc/ file, but not in this
case, or at least, not for now. Kdump/pstore is expected to work
quietly, with no users' interference. Advanced users might want to
play with the configs though; and those can just go ahead and edit
the /usr/share/kdump/kdump.conf - it's all documented in the README.

In the future we can improve that by having the override mechanism
with the /etc file, let's see if we have a demand for that.

Signed-off-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
This commit is contained in:
Guilherme G. Piccoli
2022-02-23 18:33:38 -03:00
parent 6ae626f17c
commit 5c1cc98502
7 changed files with 19 additions and 19 deletions

View File

@ -18,12 +18,12 @@ installkernel() {
}
install() {
# Having a valid /etc/default/kdump is essential for kdump.
if [ ! -s "/etc/default/kdump" ]; then
# Having a valid /usr/share/kdump/kdump.conf is essential for kdump.
if [ ! -s "/usr/share/kdump/kdump.conf" ]; then
return 1
fi
. /etc/default/kdump
. /usr/share/kdump/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
@ -45,7 +45,7 @@ install() {
echo "${DEVN}" > "$initdir"/usr/lib/kdump/kdump.devnode
cp -LR --preserve=all /usr/lib/kdump/* "$initdir"/usr/lib/kdump/
cp -LR --preserve=all /etc/default/kdump "$initdir"/usr/lib/kdump/kdump.etc
cp -LR --preserve=all /usr/share/kdump/kdump.conf "$initdir"/usr/lib/kdump/kdump.conf
inst_hook pre-mount 01 "$moddir/kdump-collect.sh"
}