Commit Graph

13 Commits

Author SHA1 Message Date
Tao Liu
62d6f35de4 dracut-kdump.sh: POSIX doesn't support pipefail
upstream: fedora
resolves: bz2003832
conflict: none

commit 725027b735
Author: Kairui Song <kasong@redhat.com>
Date:   Thu Aug 12 02:55:32 2021 +0800

    dracut-kdump.sh: POSIX doesn't support pipefail

    Set pipefail will cause POSIX shell to exit with failure. So only do
    that in bash.

    Signed-off-by: Kairui Song <kasong@redhat.com>
    Acked-by: Philipp Rudo <prudo@redhat.com>

Signed-off-by: Tao Liu <ltao@redhat.com>
2021-11-09 21:46:10 +08:00
Tao Liu
039c1d4dc8 dracut-kdump.sh: Use stat instead of ls to get vmcore size
upstream: fedora
resolves: bz2003832
conflict: none

commit b1c794a2cf
Author: Kairui Song <kasong@redhat.com>
Date:   Tue Sep 14 03:00:48 2021 +0800

    dracut-kdump.sh: Use stat instead of ls to get vmcore size

    ls output is fragile, so use stat instead.

    Signed-off-by: Kairui Song <kasong@redhat.com>
    Acked-by: Philipp Rudo <prudo@redhat.com>

Signed-off-by: Tao Liu <ltao@redhat.com>
2021-11-09 21:46:04 +08:00
Tao Liu
058c4321a8 dracut-kdump.sh: simplify dump_ssh
upstream: fedora
resolves: bz2003832
conflict: none

commit 7a9823b42e
Author: Kairui Song <kasong@redhat.com>
Date:   Tue Aug 3 13:23:26 2021 +0800

    dracut-kdump.sh: simplify dump_ssh

    There is a workaround for `scp` that it expects IPv6 address to be
    quoted with [ ... ], only apply the workaround once and store the
    updated `scp` address to reuse it.

    Signed-off-by: Kairui Song <kasong@redhat.com>
    Acked-by: Philipp Rudo <prudo@redhat.com>

Signed-off-by: Tao Liu <ltao@redhat.com>
2021-11-09 21:45:58 +08:00
Tao Liu
e268210244 dracut-kdump.sh: remove add_dump_code
upstream: fedora
resolves: bz2003832
conflict: none

commit 8f89e89071
Author: Kairui Song <kasong@redhat.com>
Date:   Mon Aug 2 01:25:17 2021 +0800

    dracut-kdump.sh: remove add_dump_code

    `add_dump_code "<op>"` is just `DUMP_INSTRUCTION="<op>"`, no need a
    extra wrapper for that.

    Signed-off-by: Kairui Song <kasong@redhat.com>
    Acked-by: Philipp Rudo <prudo@redhat.com>

Signed-off-by: Tao Liu <ltao@redhat.com>
2021-11-09 21:45:52 +08:00
Tao Liu
28cf217362 dracut-kdump.sh: don't put KDUMP_SCRIPT_DIR in PATH
upstream: fedora
resolves: bz2003832
conflict: none

commit 0675edbadb
Author: Kairui Song <kasong@redhat.com>
Date:   Mon Aug 2 01:19:44 2021 +0800

    dracut-kdump.sh: don't put KDUMP_SCRIPT_DIR in PATH

    monitor_dd_progress is the only extra binary in KDUMP_SCRIPT_DIR, no
    need to change PATH environment variable, just call it directly.

    Signed-off-by: Kairui Song <kasong@redhat.com>
    Acked-by: Philipp Rudo <prudo@redhat.com>

Signed-off-by: Tao Liu <ltao@redhat.com>
2021-11-09 21:45:45 +08:00
Tao Liu
f9025ca711 kdump-lib-initramfs.sh: move dump related functions to kdump.sh
upstream: fedora
resolves: bz2003832
conflict: none

commit a1205effaa
Author: Kairui Song <kasong@redhat.com>
Date:   Thu Aug 5 00:59:29 2021 +0800

    kdump-lib-initramfs.sh: move dump related functions to kdump.sh

    These dump related functions are only used by dracut-kdump.sh.

    Signed-off-by: Kairui Song <kasong@redhat.com>
    Acked-by: Philipp Rudo <prudo@redhat.com>

Signed-off-by: Tao Liu <ltao@redhat.com>
2021-11-09 21:45:39 +08:00
Tao Liu
13a24c49ab Merge kdump-error-handler.sh into kdump.sh
upstream: fedora
resolves: bz2003832
conflict: none

commit e7118d1de8
Author: Kairui Song <kasong@redhat.com>
Date:   Mon Aug 2 00:50:22 2021 +0800

    Merge kdump-error-handler.sh into kdump.sh

    kdump-error-handler.sh does nothing except calling three functions,
    it can be easily merged into kdump.sh by using a parameter to run the
    error handling routine.

    kdump-lib-initramfs.sh was created to hold the three shared functions
    and related code, so by merging these two files, kdump-lib-initramfs.sh
    can be simplified by a lot.

    Following up commits will clean up kdump-lib-initramfs.sh.

    Signed-off-by: Kairui Song <kasong@redhat.com>
    Acked-by: Philipp Rudo <prudo@redhat.com>

Signed-off-by: Tao Liu <ltao@redhat.com>
2021-11-09 21:45:31 +08:00
Tao Liu
67b8dd1cb8 kdump-lib.sh: add a config format and read helper
upstream: fedora
resolves: bz2003832
conflict: none

commit a0282ab22c
Author: Kairui Song <kasong@redhat.com>
Date:   Tue Aug 3 19:49:51 2021 +0800

    kdump-lib.sh: add a config format and read helper

    Add a helper `kdump_read_conf` to replace read_strip_comments.
    `kdump_read_conf` does a few more things:

      - remove trailing spaces.
      - format the content, remove duplicated spaces between name and value.
      - read from KDUMP_CONFIG_FILE (/etc/kdump.conf) directly, avoid pasting
	"/etc/kdump.conf" path everywhere in the code.
      - check if config file exists, just in case.

    Also unify the environmental variable, now KDUMP_CONFIG_FILE stands for
    the default config location.

    This helps avoid some shell pitfalls about spaces when reading config.

    Signed-off-by: Kairui Song <kasong@redhat.com>
    Acked-by: Philipp Rudo <prudo@redhat.com>

Signed-off-by: Tao Liu <ltao@redhat.com>
2021-11-03 16:08:22 +08:00
Tao Liu
910c20d3ce Fix incorrect vmcore permissions when dumped through ssh
Related: rhbz#1938165
Upstream: fedora
Conflict: none

commit 00785873ef
Author: Tao Liu <ltao@redhat.com>
Date:   Fri Mar 19 18:07:51 2021 +0800

    Fix incorrect vmcore permissions when dumped through ssh

    Previously when dumping vmcore to a remote machine through ssh,
    the files are created remotely and file permissions are taken
    from the default umask value, which making the files accessible to
    anyone on the remote machine.

    This patch fixed the security issue by setting a customized umask value
    before the file creation on the remote machine.

    Signed-off-by: Tao Liu <ltao@redhat.com>
    Acked-by: Kairui Song <kasong@redhat.com>

Signed-off-by: Tao Liu <ltao@redhat.com>
2021-04-20 16:29:34 +08:00
DistroBaker
624a6443ca Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/kexec-tools.git#33108ef524ff033295711f888ce2c67d457951aa
2021-01-22 08:12:00 +00:00
DistroBaker
6333173003 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/kexec-tools.git#fc703518525dc85b88873120f2bcf7bffa682735
2021-01-08 13:46:38 +00:00
DistroBaker
5cac7c3f96 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/kexec-tools.git#bfd06661e81465d077bac435c90b4082134adf19
2020-11-05 05:34:29 +00:00
Petr Šabata
f5bf4978d8 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/kexec-tools#041ba89902961b5490a7143d9596dc00d732cba0
2020-10-15 14:45:57 +02:00