From 3239ea1511c439a0504e32baa2df44b8cb1c3285 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 26 Feb 2013 06:36:05 +0000 Subject: bootloader-config can now read back grub2 config --- perl-install/standalone/bootloader-config | 17 +++++++---------- 1 file 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; } -- cgit v1.2.1