summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2020-05-29 12:08:17 +0100
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2020-05-29 12:08:17 +0100
commite06d741c4b73ea0e802b324de9900ff74741c357 (patch)
treef3320fd8c17973c8ae3c8b315ceb259b98935525 /perl-install
parent45cde3abd4700ceed3e9e6e6d749b9d54fe4f0c3 (diff)
downloaddrakx-e06d741c4b73ea0e802b324de9900ff74741c357.tar
drakx-e06d741c4b73ea0e802b324de9900ff74741c357.tar.gz
drakx-e06d741c4b73ea0e802b324de9900ff74741c357.tar.bz2
drakx-e06d741c4b73ea0e802b324de9900ff74741c357.tar.xz
drakx-e06d741c4b73ea0e802b324de9900ff74741c357.zip
Don't die in write_grub2 if grub.cfg doesn't exist (mga#26676).
This bug was introduced by the change from renaming to copying grub.cfg. renamef doesn't fail if the file doesn't exist. cp_af does.
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS2
-rw-r--r--perl-install/bootloader.pm2
-rw-r--r--perl-install/install/NEWS2
3 files changed, 5 insertions, 1 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 416055980..5f6cb71f8 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,3 +1,5 @@
+- drakboot: don't die in write_grub2 if grub.cfg doesn't exist (mga#26676)
+
Version 18.27.1 - 8 May 2020
- bootloader:
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index b77e1432b..fe69db7af 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -2103,7 +2103,7 @@ sub write_grub2 {
my $f1 = "$::prefix/boot/grub2/grub.cfg";
# we won't just rename as update-grub2 (more likely os-prober may fail):
- cp_af($f1, $f1 . '.old');
+ cp_af($f1, $f1 . '.old') if -e $f1;
run_program::rooted($::prefix, 'update-grub2', '2>', \$error) or die "update-grub2 failed: $error";
log::l("update-grub2 logs: $error");
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 93cf8272a..ae2c6798d 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,5 @@
+- bootloader: don't die in write_grub2 if grub.cfg doesn't exist (mga#26676)
+
Version 18.27.1 - 8 May 2020
- bootloader: