summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/bootloader-config
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2013-02-26 06:36:05 +0000
committerThierry Vignaud <tv@mageia.org>2013-02-26 06:36:05 +0000
commit2f6947108ac72e168d6f8b98e9f7f43929de11a6 (patch)
tree7ef5a8eb9958ea2235aba607cefdbf39c4de780b /perl-install/standalone/bootloader-config
parentad49c99bcbf96ceba99541e238b4682728fd7bb4 (diff)
downloaddrakx-2f6947108ac72e168d6f8b98e9f7f43929de11a6.tar
drakx-2f6947108ac72e168d6f8b98e9f7f43929de11a6.tar.gz
drakx-2f6947108ac72e168d6f8b98e9f7f43929de11a6.tar.bz2
drakx-2f6947108ac72e168d6f8b98e9f7f43929de11a6.tar.xz
drakx-2f6947108ac72e168d6f8b98e9f7f43929de11a6.zip
bootloader-config can now read back grub2 config
Diffstat (limited to 'perl-install/standalone/bootloader-config')
-rwxr-xr-xperl-install/standalone/bootloader-config17
1 files changed, 7 insertions, 10 deletions
diff --git a/perl-install/standalone/bootloader-config b/perl-install/standalone/bootloader-config
index ef9e10a16..a9b94d477 100755
--- a/perl-install/standalone/bootloader-config
+++ b/perl-install/standalone/bootloader-config
@@ -61,16 +61,14 @@ if ($image) {
my $all_hds = fsedit::get_hds();
fs::get_info_from_fstab($all_hds);
-my $have_grub2 = -e "/boot/grub2/grub.cfg"; # FIXME: check detectloader
+my $have_grub2 = -e "/boot/grub2/grub.cfg";
my $bootloader;
-if (!$have_grub2) {
- $bootloader = bootloader::read($all_hds);
- if (!$bootloader) {
- if (member($action, 'add-kernel', 'remove-kernel')) {
- warn "Cannot find a boot loader installed. Only taking care of initrd\n";
- } else {
- die "Cannot find a boot loader installed\n";
- }
+$bootloader = bootloader::read($all_hds);
+if (!$bootloader) {
+ if (member($action, 'add-kernel', 'remove-kernel')) {
+ warn "Cannot find a boot loader installed. Only taking care of initrd\n";
+ } else {
+ die "Cannot find a boot loader installed\n";
}
}
@@ -372,6 +370,5 @@ sub remove_splash() {
}
sub detectloader() {
- print "grub2\n" if $have_grub2;
print uc(bootloader::main_method($bootloader->{method})), "\n" if $bootloader;
}