kdump/kdump-use-pbl.patch
Petr Tesařík f611d607d5 Accepting request 936727 from home:ptesarik:branches:Kernel:kdump
- Update to 0.9.2
  * Isolate fadump initrd within the default one (jsc#SLE-18272)
  * Bug fixes
  * Code cleanups
- Remove patches that have been upstreamed:
  * kdump-mounts.cc-Include-sys-ioctl.h.patch
  * kdump-Add-bootdev-to-dracut-command-line.patch
  * kdump-do-not-iterate-past-end-of-string.patch
  * kdump-fix-incorrect-exit-code-checking.patch
  * kdump-avoid-endless-loop-on-EAI_AGAIN.patch
  * kdump-install-real-resolv.conf.patch
  * kdump-Store-kdump-initrd-in-kernel-image-path.patch
- Remove patches that have been solved differently:
  * kdump-on-error-option-yesno.patch

OBS-URL: https://build.opensuse.org/request/show/936727
OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/kdump?expand=0&rev=215
2021-12-08 16:31:52 +00:00

97 lines
2.6 KiB
Diff

Date: Mon Jul 2 18:12:34 2018 +0200
From: Michal Koutný <mkoutny@suse.com>
Subject: Replace obsolete perl-Bootloader library with a simpler script
References: bsc#1050349
Upstream: tbd
Signed-off-by: Michal Koutný <mkoutny@suse.com>
Acked-by: Petr Tesarik <ptesarik@suse.com>
---
init/CMakeLists.txt | 1
init/kdump-bootloader.pl | 48 -----------------------------------------------
init/load.sh | 14 ++-----------
3 files changed, 3 insertions(+), 60 deletions(-)
--- a/init/CMakeLists.txt
+++ b/init/CMakeLists.txt
@@ -65,7 +65,6 @@ INSTALL(
INSTALL(
FILES
${CMAKE_CURRENT_SOURCE_DIR}/mkdumprd
- ${CMAKE_CURRENT_SOURCE_DIR}/kdump-bootloader.pl
DESTINATION
/usr/sbin
PERMISSIONS
--- a/init/load.sh
+++ b/init/load.sh
@@ -214,14 +214,10 @@ function fadump_bootloader()
local newstate="$1"
# check if the old configuration is still valid
- boot_opts=$(kdump-bootloader.pl --get)
- nofadump_opts=$(echo "$boot_opts" | remove_from_commandline 'fadump')
if [ "$newstate" = on ] ; then
- if [ "$boot_opts" = "$nofadump_opts" ] ; then
- kdump-bootloader.pl --update fadump=on
- fi
- elif [ "$boot_opts" != "$nofadump_opts" ] ; then
- kdump-bootloader.pl --update
+ pbl --add-option fadump=on --config
+ else
+ pbl --del-option fadump=on --config
fi
}
--- a/init/kdump-bootloader.pl
+++ /dev/null
@@ -1,48 +0,0 @@
-#! /usr/bin/perl
-
-use Bootloader::Tools;
-
-Bootloader::Tools::InitLibrary();
-
-my $grub2;
-my $section;
-if (Bootloader::Tools::GetBootloader() =~ /^(grub2|grub2-efi)$/) {
- $grub2 = true;
- $section = Bootloader::Tools::GetGlobals();
-} else {
- $grub2 = false;
- $section = Bootloader::Tools::GetDefaultSection();
-}
-
-if ($ARGV[0] eq "--get") {
- print $section->{"append"};
-} elsif ($ARGV[0] eq "--update") {
- my $input = $section->{"append"};
- my $result;
- while (length($input)) {
- $input =~ s/^[[:space:]]+//;
- if ($input =~ s/^("[^"]*"?|[^"[:space:]]+)+//) {
- my $rawparam = $&;
- my $param = $rawparam;
- $param =~ s/"//g;
- $param =~ s/=(.*)//;
- if (! ($param =~ /^fadump$/)) {
- $result .= " " if length($result);
- $result .= $rawparam;
- }
- }
- }
-
- shift @ARGV;
- $result .= " " if length($result);
- $result .= join(" ", @ARGV);
- if ($grub2) {
- Bootloader::Tools::SetGlobals("append" => $result);
- } else {
- $section->{"append"} = $result;
- $section->{"__modified"} = 1;
- Bootloader::Tools::SetGlobals();
- }
-} else {
- die "Need an action (--get or --update)";
-}