Export kdump_mnt[] array to dracut

This array can be used instead instead of the two special variables
(but it conveys more information).

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Treat /boot as any other kdump-specific mount

The /boot mount point does not need any special treatment, except in
kdump_init_dirs; and the check can be moved there thanks to the previous
commit.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Cleanup: use a common function to add kdump mountpoints

Since /boot does not have a hard-wired index any longer, it can use
the same mechanism as all the other mount points.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Mount the root filesystem under /kdump

This fixes a bug that the root filesystem is resolved as /kdump/sysroot,
because the /kdump prefix is treated as a chroot environment, so the
../sysroot symlink does not work.

Admittedly, the root block device is mounted twice, but that has worked
for a very long time in Linux.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Read configuration outside of kdump_setup_files

This allows to read the config options earlier and use them prior to
calling this function.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Cleanup: use kdump_get_config from mkdumprd

Note that this calls "kdumptool dump_config", which first interprets
the options and then outputs the canonical form, so e.g. all variants
of true are converted to "yes" for Boolean value.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Mount boot/root only if needed

First, the root partition is needed only if it contains /boot.
Second, the /boot directory is needed only if KDUMP_COPY_KERNEL is
true.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Do not try to mount using /etc/fstab.kdump unless it exists

When using dracut, this file is in fact merged with /etc/fstab and
handled by dracut itself.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Include original mountpoint path in kdump environment

The target path gets copied into notificiation mails, but the admin
has no idea which path was mounted on /mnt$i in the kdump environment,
and it is confusing.

It is still necessary to prefix the mount path with /mnt$i, because
the corresponding mount point may not exist if it was on a third
mount that is not included in the kdump environment.

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Copy required programs to the initrd

When using dracut, binaries specified in KDUMP_REQUIRED_PROGRAMS were
not copied into the initrd.

References: bnc#874571
Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Create SSH directories on remote host, not local

Revert a silly bug introduced in
commit 80c41c34b534158ab42254b5cc5bde78dc102493

SFTPTransfer::mkdir() is very different from FilePath::mkdir().

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
Bump version to 0.8.12

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>