summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2015-05-09 13:12:46 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2015-05-09 13:16:39 +0200
commit9923b3284a81cc9a6068e9f82ac5c5b8c1032987 (patch)
tree3959df9ee90b9220d620f27dc5b43a8cdf4c6fc9 /perl-install
parent5504832df4ea818cfa48004e97d35e74fad7dc70 (diff)
downloaddrakx-9923b3284a81cc9a6068e9f82ac5c5b8c1032987.tar
drakx-9923b3284a81cc9a6068e9f82ac5c5b8c1032987.tar.gz
drakx-9923b3284a81cc9a6068e9f82ac5c5b8c1032987.tar.bz2
drakx-9923b3284a81cc9a6068e9f82ac5c5b8c1032987.tar.xz
drakx-9923b3284a81cc9a6068e9f82ac5c5b8c1032987.zip
backup grub2 files before configuring
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS2
-rw-r--r--perl-install/bootloader.pm8
-rw-r--r--perl-install/install/NEWS2
3 files changed, 12 insertions, 0 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 1f61dc29c..5cb52e2e6 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -2,6 +2,8 @@
o recognize r8723bs (mga#15874)
- diskdrake:
o do not set noauto for /boot/EFI (mga#15627)
+- drakboot:
+ o backup grub2 files before configuring
- harddrake:
o fix detecting AHCI as SATA (mga#9992)
o fix detecting some memory chips (mga#5810)
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 6fb380567..99cfcec3a 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -1805,15 +1805,23 @@ sub write_grub2 {
$conf{GRUB_GFXPAYLOAD_LINUX} = 'auto' if is_uefi();
$conf{GRUB_DISABLE_RECOVERY} = 'false'; # for 'failsafe' entry
$conf{GRUB_TIMEOUT} = $bootloader->{timeout};
+ renamef($f, $f . ($o_backup_extension || '.old'));
setVarsInSh($f, \%conf);
+ my $f1 = "$::prefix/boot/grub2/grub.cfg";
+ renamef($f1, $f1 . ($o_backup_extension || '.old'));
run_program::rooted($::prefix, 'update-grub2', '2>', \$error) or die "update-grub2 failed: $error";
log::l("update-grub2 logs: $error");
# set default entry:
eval {
+ my $f2 = "$::prefix/boot/grub2/grubenv";
+ cp_af($f2, $f2 . ($o_backup_extension || '.old'));
run_program::rooted($::prefix, 'grub2-set-default', '2>', \$error, $bootloader->{default}) or die "grub2-set-default failed: $error";
};
+ if (my $err = $@) {
+ log::l("error while running grub2-set-default: $err");
+ }
check_enough_space();
write_grub2_install_sh($bootloader, $o_backup_extension);
}
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 24d34dcfe..cb230b32f 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,5 @@
+- bootloader:
+ o backup grub2 files before configuring
- log grub2 install.sh in report.bug like for grub (mga#15857)
- always log update-grub2 output (mga#15857)
- networking: