Unnamed repository
Go to file
Tao Liu c9f583baa4 kdump-lib.sh: rework nmcli related functions
upstream: fedora
resolves: bz2003832
conflict: none

commit 58d3e6db3a
Author: Kairui Song <kasong@redhat.com>
Date:   Wed Sep 8 15:20:42 2021 +0800

    kdump-lib.sh: rework nmcli related functions

    This fixes word splitting issue with nmcli args. Current kexec-tools
    scripts won't call nmcli with correct arguments when there are space in
    network interface name.

    nmcli expects multiple parameters, but get_nmcli_value_by_field only
    accepts two params and depends on shell word splitting to split the
    _nm_show_cmd into multiple params, which is very fragile.
    So switch the param order, simplified this function and now multiple
    params can be used properly.

    And get_nmcli_connection_show_cmd_by_ifname returns multiple
    nmcli params in a single variable, it depend on shell word splitting to
    split the words when calling nmcli. But this is very fragile and break
    easily when there are any special character in the connection path.

    This function is only introduced to get and cache the nmcli command
    which contains the "connection name".

    Actually only cache the "connection path" is enough. Callers should
    just call get_nmcli_connection_apath_by_ifname to cache the path, and
    a new helper get_nmcli_field_by_conpath is introduced here to get value
    from nmcli. This way "connection path" can contain any character.

    Also get rid of another nmcli_cmd usage in
    get_nmcli_connection_apath_by_ifname which stores multiple params in a
    single bash variable separated by space.

    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:53:00 +08:00
tests Merged update from upstream sources 2020-11-20 12:35:49 +00:00
.editorconfig kdump-lib-initramfs.sh: prepare to be a POSIX compatible lib 2021-11-09 21:45:15 +08:00
.gitignore RHEL 9.0.0 Alpha bootstrap 2020-10-15 14:45:57 +02:00
60-kdump.install Write to /var/lib/kdump if $KDUMP_BOOTDIR not writable 2021-06-23 09:34:40 +08:00
92-crashkernel.install Add a new hook: 92-crashkernel.install 2021-07-08 15:42:34 +08:00
98-kexec.rules RHEL 9.0.0 Alpha bootstrap 2020-10-15 14:45:57 +02:00
98-kexec.rules.ppc64 Stop reloading kdump service on CPU hotplug event for FADump 2021-05-14 14:27:03 +08:00
crashkernel-howto.txt Add a crashkernel-howto.txt doc 2021-07-08 15:43:40 +08:00
dracut-early-kdump-module-setup.sh bash scripts: reformat with shfmt 2021-11-09 21:42:45 +08:00
dracut-early-kdump.sh Merged update from upstream sources 2021-01-22 08:12:00 +00:00
dracut-fadump-init-fadump.sh fadump-init: clean up mount points properly 2021-07-20 15:43:43 +08:00
dracut-fadump-module-setup.sh fadump: isolate fadump initramfs image within the default one 2021-07-20 15:43:11 +08:00
dracut-kdump-capture.service RHEL 9.0.0 Alpha bootstrap 2020-10-15 14:45:57 +02:00
dracut-kdump-emergency.service Merge kdump-error-handler.sh into kdump.sh 2021-11-09 21:45:31 +08:00
dracut-kdump-emergency.target RHEL 9.0.0 Alpha bootstrap 2020-10-15 14:45:57 +02:00
dracut-kdump.sh dracut-kdump.sh: reformat with shfmt 2021-11-09 21:46:37 +08:00
dracut-module-setup.sh kdump-lib.sh: rework nmcli related functions 2021-11-09 21:53:00 +08:00
dracut-monitor_dd_progress RHEL 9.0.0 Alpha bootstrap 2020-10-15 14:45:57 +02:00
early-kdump-howto.txt RHEL 9.0.0 Alpha bootstrap 2020-10-15 14:45:57 +02:00
fadump-howto.txt Clear old crashkernl=auto in comment and doc 2021-08-06 01:33:34 +00:00
gating.yaml Add gating.yaml to RHEL-9 kexec-tools 2021-06-08 20:03:41 +08:00
kdump-dep-generator.sh Merged update from upstream sources 2021-01-22 08:12:00 +00:00
kdump-in-cluster-environment.txt RHEL 9.0.0 Alpha bootstrap 2020-10-15 14:45:57 +02:00
kdump-lib-initramfs.sh kdump-lib-initramfs.sh: make it POSIX compatible 2021-11-09 21:46:45 +08:00
kdump-lib.sh kdump-lib.sh: rework nmcli related functions 2021-11-09 21:53:00 +08:00
kdump-logger.sh Merged update from upstream sources 2020-11-20 12:35:49 +00:00
kdump-udev-throttler RHEL 9.0.0 Alpha bootstrap 2020-10-15 14:45:57 +02:00
kdump.conf Merged update from upstream sources 2021-01-22 08:12:00 +00:00
kdump.conf.5 Merged update from upstream sources 2021-01-22 08:12:00 +00:00
kdump.service Merged update from upstream sources 2020-11-05 05:34:29 +00:00
kdump.sysconfig Disable CMA in kdump 2nd kernel 2021-05-14 14:27:03 +08:00
kdump.sysconfig.aarch64 Disable CMA in kdump 2nd kernel 2021-05-14 14:27:03 +08:00
kdump.sysconfig.i386 Disable CMA in kdump 2nd kernel 2021-05-14 14:27:03 +08:00
kdump.sysconfig.ppc64 Disable CMA in kdump 2nd kernel 2021-05-14 14:27:03 +08:00
kdump.sysconfig.ppc64le Disable CMA in kdump 2nd kernel 2021-05-14 14:27:03 +08:00
kdump.sysconfig.s390x kdump.sysconfig.s390: Remove "prot_virt" from kdump kernel cmdline 2021-07-20 17:27:12 +02:00
kdump.sysconfig.x86_64 Revert "Revert "x86_64: enable the kexec file load by default"" 2021-07-14 09:21:57 +08:00
kdumpctl bash scripts: reformat with shfmt 2021-11-09 21:42:45 +08:00
kdumpctl.8 kdumpctl: Add kdumpctl reset-crashkernel 2021-07-08 15:42:14 +08:00
kexec-kdump-howto.txt Merged update from upstream sources 2021-01-22 08:12:00 +00:00
kexec-tools-2.0.20-eppic-Remove-duplicated-variable-declaration.patch RHEL 9.0.0 Alpha bootstrap 2020-10-15 14:45:57 +02:00
kexec-tools-2.0.22-makedumpfile-check-for-invalid-physical-address-proc-kcore-when-making-ELF-dumpfile.patch check for invalid physical address of /proc/kcore when making ELF dumpfile 2021-06-29 13:14:08 +08:00
kexec-tools-2.0.22-makedumpfile-Increase-SECTION_MAP_LAST_BIT-to-5.patch Increase SECTION_MAP_LAST_BIT to 5 2021-06-28 22:05:35 +08:00
kexec-tools.spec Merge kdump-error-handler.sh into kdump.sh 2021-11-09 21:45:31 +08:00
live-image-kdump-howto.txt RHEL 9.0.0 Alpha bootstrap 2020-10-15 14:45:57 +02:00
mkdumprd bash scripts: reformat with shfmt 2021-11-09 21:42:45 +08:00
mkdumprd.8 Merged update from upstream sources 2020-12-23 10:00:07 +00:00
mkfadumprd bash scripts: reformat with shfmt 2021-11-09 21:42:45 +08:00
README RHEL 9.0.0 Alpha bootstrap 2020-10-15 14:45:57 +02:00
sources update makedumpfile to v1.6.9 2021-05-14 14:27:03 +08:00
supported-kdump-targets.txt Add file supported-kdump-targets.txt to kexec-tools 2021-09-07 14:32:27 +08:00
zanata-notes.txt RHEL 9.0.0 Alpha bootstrap 2020-10-15 14:45:57 +02:00

Adding a patch to kexec-tools
=============================
There is a mailing list kexec@lists.fedoraproject.org where all the dicussion
related to fedora kexec-tools happen. All the patches are posted there for
inclusion and committed to kexec-tools after review.

So if you want your patches to be included in fedora kexec-tools package,
post these to kexec@lists.fedoraproject.org.

One can subscribe to list and browse through archives here.

https://admin.fedoraproject.org/mailman/listinfo/kexec