diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2020-05-29 12:08:17 +0100 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2020-05-29 12:08:17 +0100 |
commit | e06d741c4b73ea0e802b324de9900ff74741c357 (patch) | |
tree | f3320fd8c17973c8ae3c8b315ceb259b98935525 | |
parent | 45cde3abd4700ceed3e9e6e6d749b9d54fe4f0c3 (diff) | |
download | drakx-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.
-rw-r--r-- | perl-install/NEWS | 2 | ||||
-rw-r--r-- | perl-install/bootloader.pm | 2 | ||||
-rw-r--r-- | perl-install/install/NEWS | 2 |
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: |