From ad796763fc0b11db7dd49beeb163ddf8f79c74dc79d916d6e96ae7c0900ffd1e Mon Sep 17 00:00:00 2001 From: Tony Jones Date: Tue, 11 Apr 2017 15:09:33 +0000 Subject: [PATCH] Accepting request 487381 from home:bmwiedemann:branches:Kernel:kdump fix kexec-bootloader with /boot partition (boo#1033599) also enable warnings (none to be seen atm) OBS-URL: https://build.opensuse.org/request/show/487381 OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/kexec-tools?expand=0&rev=79 --- kexec-bootloader | 15 ++++++++------- kexec-tools.changes | 5 +++++ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/kexec-bootloader b/kexec-bootloader index fdf8a2f..350eb15 100644 --- a/kexec-bootloader +++ b/kexec-bootloader @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/perl -w # # This program is free software; you can redistribute it and/or {{{ # modify it under the terms of the GNU General Public License @@ -152,12 +152,13 @@ if (!$section) { my $image=$section->{"image"}; my $initrd=$section->{"initrd"}; -# handle btfs /@ -> / -if (substr ($image, 0, 3) eq "/@/") { - $image = substr ($image, 2); -} -if ($initrd && substr ($initrd, 0, 3) eq "/@/") { - $initrd = substr ($initrd, 2); +for my $file ($image, $initrd) { + # handle btfs /@ -> / + $file =~ s!^/@/!/!; + # handle /boot on separate partition + if($file !~ m!^/boot/! && ! -e $file && -e "/boot$file") { + $file="/boot$file" + } } if ($debug) { diff --git a/kexec-tools.changes b/kexec-tools.changes index ad4b302..d77f61e 100644 --- a/kexec-tools.changes +++ b/kexec-tools.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Apr 11 14:27:09 UTC 2017 - bwiedemann@suse.com + +- fix kexec-bootloader with /boot partition (boo#1033599) + ------------------------------------------------------------------- Wed Feb 22 12:51:28 UTC 2017 - meissner@suse.com