diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2015-04-08 07:52:40 -0400 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2015-04-09 06:21:08 -0400 |
commit | 32c13f240d965a60c15ad70152b5930faa3caee8 (patch) | |
tree | 4a051c8872aeaa65884f13191ac587f1011fc7e5 /perl-install | |
parent | 3e7995bef00ad7b4381ed0f66eec8bdeb57382b1 (diff) | |
download | drakx-32c13f240d965a60c15ad70152b5930faa3caee8.tar drakx-32c13f240d965a60c15ad70152b5930faa3caee8.tar.gz drakx-32c13f240d965a60c15ad70152b5930faa3caee8.tar.bz2 drakx-32c13f240d965a60c15ad70152b5930faa3caee8.tar.xz drakx-32c13f240d965a60c15ad70152b5930faa3caee8.zip |
write /boot/grub2/install.sh like for grub
thus deprecating /boot/grub2/drakboot.conf
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/NEWS | 1 | ||||
-rw-r--r-- | perl-install/bootloader.pm | 19 | ||||
-rw-r--r-- | perl-install/install/NEWS | 1 |
3 files changed, 16 insertions, 5 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS index 8e8c1e6c3..4a9c55dbf 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,6 +1,7 @@ - drakboot: o check there's still some place on /boot with grub2 too o fix detecting grub2 on UEFI + o write /boot/grub2/install.sh like for grub instead of drakboot.conf Version 16.79 - 7 April 2015 diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 531162103..0c6b317ad 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -1791,6 +1791,16 @@ sub write_grub2 { run_program::rooted($::prefix, 'grub2-set-default', '2>', \$error, $bootloader->{default}) or die "grub2-set-default failed: $error"; }; check_enough_space(); + write_grub2_install_sh($bootloader, $o_backup_extension); +} + +sub write_grub2_install_sh { + my ($bootloader, $o_backup_extension) = @_; + my $f = "$::prefix/boot/grub2/install.sh"; + my $boot = $bootloader->{boot}; + my @options = $boot =~ /\d$/ ? ('--grub-setup=/bin/true', $boot) : $boot; + renamef($f, $f . ($o_backup_extension || '.old')); + output_with_perm($f, 0755, join(' ', 'grub2-install', @options)); } sub write_grub { @@ -1994,13 +2004,12 @@ sub install_grub2 { sub install_raw_grub2 { my ($boot) = @_; my $error; - # if (member($boot, map { "/dev/$_->{device}" } @{$all_hds->{hds}}) { - my @options = $boot =~ /\d$/ ? ('--grub-setup=/bin/true', $boot) : $boot; - if (!run_program::rooted($::prefix, 'grub2-install', '2>', \$error, @options)) { - log::explanations("grub2-install failed:\n(grub2-install @options)\nError: <$error>"); + my $f = '/boot/grub2/install.sh'; + if (!run_program::rooted($::prefix, "sh", "2>", \$error, $f)) { + log::explanations("grub2-install failed:\n(" . cat_($f) . ")\nError: <$error>"); die "grub2-install failed: $error"; } - setVarsInSh("$::prefix/boot/grub2/drakboot.conf", { boot => $boot }); + unlink("$::prefix/boot/grub2/drakboot.conf"); } sub install_grub { diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 1476ee7be..036cff435 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,6 +1,7 @@ - bootloader config: o check there's still some place on /boot with grub2 too o fix detecting grub2 on UEFI + o write /boot/grub2/install.sh like for grub instead of drakboot.conf - log grub2 config in report.bug like for grub/lilo Version 16.79 - 7 April 2015 |