commit perl-Bootloader for openSUSE:Factory
Hello community, here is the log from the commit of package perl-Bootloader for openSUSE:Factory checked in at 2012-05-03 10:59:28 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Bootloader (Old) and /work/SRC/openSUSE:Factory/.perl-Bootloader.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "perl-Bootloader", Maintainer is "snwint@suse.com" Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Bootloader/perl-Bootloader.changes 2012-04-02 10:30:32.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.perl-Bootloader.new/perl-Bootloader.changes 2012-05-03 10:59:31.000000000 +0200 @@ -1,0 +2,20 @@ +Fri Apr 27 12:06:09 CEST 2012 - mchang@suse.de + +- fix after grub2 package update, the system become unbootable. (bnc#758570) + also fix running update-bootloader --refresh returns error when extended + partition is to be installed. +- 0.6.3 + +------------------------------------------------------------------- +Mon Apr 23 11:26:15 CEST 2012 - mchang@suse.de + +- add read/write grub2-efi's settings for global options from yast2's + bootloader option widgets, including timeout, hiddenmenu, vgamode, append + and default +- add read/write grub2's settings for serial console from yast2's bootloader + option widgets +- add read/write grub2's settings for global options from yast2's bootloader + option widgets, including timeout, hiddenmenu, vgamode, append and default +- fix bootloader_entry util to correctly handle grub2's case (bnc#755183) + +------------------------------------------------------------------- Old: ---- perl-Bootloader-0.6.1.tar.bz2 New: ---- perl-Bootloader-0.6.3.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Bootloader.spec ++++++ --- /var/tmp/diff_new_pack.QI5uiV/_old 2012-05-03 10:59:36.000000000 +0200 +++ /var/tmp/diff_new_pack.QI5uiV/_new 2012-05-03 10:59:36.000000000 +0200 @@ -17,7 +17,7 @@ Name: perl-Bootloader -Version: 0.6.1 +Version: 0.6.3 Release: 0 Requires: perl-base = %{perl_version} Requires: e2fsprogs ++++++ bootloader_entry ++++++ --- /var/tmp/diff_new_pack.QI5uiV/_old 2012-05-03 10:59:36.000000000 +0200 +++ /var/tmp/diff_new_pack.QI5uiV/_new 2012-05-03 10:59:36.000000000 +0200 @@ -194,6 +194,10 @@ update_bootloader --refresh || exit 1 ;; esac + elif [ -f $PERL_BOOTLOADER_TESTSUITE_PATH/etc/sysconfig/bootloader ] && + [ -f $PERL_BOOTLOADER_TESTSUITE_PATH/boot/grub2/grub.cfg -o \ + -f $PERL_BOOTLOADER_TESTSUITE_PATH/boot/grub2-efi/grub.cfg ]; then + update_bootloader --refresh || exit 1 fi fi } @@ -266,6 +270,10 @@ # Run the bootloader (e.g., lilo). update_bootloader --refresh || exit 1 + elif [ -f $PERL_BOOTLOADER_TESTSUITE_PATH/etc/sysconfig/bootloader ] && + [ -f $PERL_BOOTLOADER_TESTSUITE_PATH/boot/grub2/grub.cfg -o \ + -f $PERL_BOOTLOADER_TESTSUITE_PATH/boot/grub2-efi/grub.cfg ]; then + update_bootloader --refresh || exit 1 fi fi } ++++++ perl-Bootloader-0.6.1.tar.bz2 -> perl-Bootloader-0.6.3.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perl-Bootloader-0.6.1/bootloader_entry new/perl-Bootloader-0.6.3/bootloader_entry --- old/perl-Bootloader-0.6.1/bootloader_entry 2012-03-30 11:47:45.000000000 +0200 +++ new/perl-Bootloader-0.6.3/bootloader_entry 2012-04-27 12:07:25.000000000 +0200 @@ -194,6 +194,10 @@ update_bootloader --refresh || exit 1 ;; esac + elif [ -f $PERL_BOOTLOADER_TESTSUITE_PATH/etc/sysconfig/bootloader ] && + [ -f $PERL_BOOTLOADER_TESTSUITE_PATH/boot/grub2/grub.cfg -o \ + -f $PERL_BOOTLOADER_TESTSUITE_PATH/boot/grub2-efi/grub.cfg ]; then + update_bootloader --refresh || exit 1 fi fi } @@ -266,6 +270,10 @@ # Run the bootloader (e.g., lilo). update_bootloader --refresh || exit 1 + elif [ -f $PERL_BOOTLOADER_TESTSUITE_PATH/etc/sysconfig/bootloader ] && + [ -f $PERL_BOOTLOADER_TESTSUITE_PATH/boot/grub2/grub.cfg -o \ + -f $PERL_BOOTLOADER_TESTSUITE_PATH/boot/grub2-efi/grub.cfg ]; then + update_bootloader --refresh || exit 1 fi fi } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perl-Bootloader-0.6.1/perl-Bootloader.changes new/perl-Bootloader-0.6.3/perl-Bootloader.changes --- old/perl-Bootloader-0.6.1/perl-Bootloader.changes 2012-03-30 11:47:45.000000000 +0200 +++ new/perl-Bootloader-0.6.3/perl-Bootloader.changes 2012-04-27 12:07:25.000000000 +0200 @@ -1,4 +1,24 @@ ------------------------------------------------------------------- +Fri Apr 27 12:06:09 CEST 2012 - mchang@suse.de + +- fix after grub2 package update, the system become unbootable. (bnc#758570) + also fix running update-bootloader --refresh returns error when extended + partition is to be installed. +- 0.6.3 + +------------------------------------------------------------------- +Mon Apr 23 11:26:15 CEST 2012 - mchang@suse.de + +- add read/write grub2-efi's settings for global options from yast2's + bootloader option widgets, including timeout, hiddenmenu, vgamode, append + and default +- add read/write grub2's settings for serial console from yast2's bootloader + option widgets +- add read/write grub2's settings for global options from yast2's bootloader + option widgets, including timeout, hiddenmenu, vgamode, append and default +- fix bootloader_entry util to correctly handle grub2's case (bnc#755183) + +------------------------------------------------------------------- Thu Mar 22 10:30:34 UTC 2012 - mchang@suse.com - grub2-kernel-commandline.patch: add kerenl parameters (detected diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perl-Bootloader-0.6.1/src/Core/GRUB2.pm new/perl-Bootloader-0.6.3/src/Core/GRUB2.pm --- old/perl-Bootloader-0.6.1/src/Core/GRUB2.pm 2012-03-30 11:47:45.000000000 +0200 +++ new/perl-Bootloader-0.6.3/src/Core/GRUB2.pm 2012-04-27 12:07:25.000000000 +0200 @@ -317,7 +317,8 @@ return [ Bootloader::Path::Grub2_devicemap(), Bootloader::Path::Grub2_installdevice(), - Bootloader::Path::Grub2_defaultconf() ]; + Bootloader::Path::Grub2_defaultconf(), + Bootloader::Path::Grub2_conf() ]; } =item @@ -398,6 +399,13 @@ # in glob_ref accordingly my ($boot_dev,) = $self->SplitDevPath ("/boot"); my ($root_dev,) = $self->SplitDevPath ("/"); + + # $boot_dev and $root_dev should be kernel device + # otherwise GetExtendedPartition() may not work + # as expected + $boot_dev = $self->GetKernelDevice($boot_dev); + $root_dev = $self->GetKernelDevice($root_dev); + my $extended_dev = $self->GetExtendedPartition($boot_dev) || ""; # mbr_dev is the first bios device my $mbr_dev = $self->GrubDev2UnixDev("(hd0)"); @@ -460,7 +468,17 @@ } } + my @confs = @{$files{Bootloader::Path::Grub2_conf()} || []}; + my @entries = (); + foreach my $conf (@confs) { + if ($conf =~ /^menuentry\s+['"](.*)['"]\s+/) { + push @entries, { "menuentry" => $1 }; + } + } + $self->{"global"} = $glob_ref; + $self->{"sections"} = \@entries; + return 1; } @@ -647,6 +665,9 @@ my %ret = (); $ret{"__lines"} = \@lines; + my $timeout; + my $hidden_timeout; + foreach my $line_ref (@lines) { my $key = $line_ref->{"key"}; my $val = $line_ref->{"value"}; @@ -654,7 +675,7 @@ # Check if key is defined to prevent perl warnings next if (!defined($key)); - if ($key =~ m/@?GRUB_CMDLINE_LINUX_DEFAULT/) + if ($key =~ m/@?GRUB_CMDLINE_LINUX_DEFAULT$/) { if ($val =~ /^(?:(.*)\s+)?vga=(\S+)(?:\s+(.*))?$/) { @@ -663,9 +684,35 @@ } $ret{"append"} = $val; + } elsif ($key =~ m/@?GRUB_TIMEOUT$/) { + $timeout = $val; + } elsif ($key =~ m/@?GRUB_HIDDEN_TIMEOUT$/) { + $hidden_timeout = $val; + } elsif ($key =~ m/@?GRUB_TERMINAL/) { + if ($val =~ m/^(serial|console|gfxterm)$/) { + $ret{"terminal"} = $val; + } + } elsif ($key =~ m/@?GRUB_SERIAL_COMMAND/) { + $ret{"serial"} = $val; + } + } + + if (defined $timeout) { + if ($timeout == 0) { + if (defined $hidden_timeout) { + $ret{"timeout"} = $hidden_timeout; + $ret{"hiddenmenu"} = "true"; + } else { + $ret{"timeout"} = $timeout; + $ret{"hiddenmenu"} = "true"; + } + } else { + $ret{"timeout"} = $timeout; + $ret{"hiddenmenu"} = "false"; } } + return \%ret; } @@ -705,7 +752,7 @@ }, { 'key' => 'GRUB_DEFAULT', - 'value' => '0', + 'value' => 'saved', }, { 'key' => 'GRUB_HIDDEN_TIMEOUT', @@ -782,18 +829,54 @@ # my $root = delete $globinfo{"root"} || ""; my $vga = delete $globinfo{"vgamode"} || ""; my $append = delete $globinfo{"append"} || ""; + my $timeout = delete $globinfo{"timeout"} || ""; + my $hiddenmenu = delete $globinfo{"hiddenmenu"} || ""; + my $terminal = delete $globinfo{"terminal"} || ""; + my $serial = delete $globinfo{"serial"} || ""; # $root = " root=$root" if $root ne ""; $vga = " vga=$vga" if $vga ne ""; $append = " $append" if $append ne ""; + my $hidden_timeout = "$timeout"; + if ("$hiddenmenu" eq "true") { + $timeout = "0" if "$timeout" ne ""; + } else { + $hidden_timeout = "0" if "$hidden_timeout" ne ""; + } + @lines = map { my $line_ref = $_; my $key = $line_ref->{"key"}; - if ($key =~ m/@?GRUB_CMDLINE_LINUX_DEFAULT/) + if ($key =~ m/@?GRUB_CMDLINE_LINUX_DEFAULT$/) { $line_ref->{"value"} = "$append$vga" if "$append$vga" ne ""; $append = ""; $vga = ""; + } elsif ($key =~ m/@?GRUB_TIMEOUT$/) { + $line_ref->{"value"} = "$timeout" if "$timeout" ne ""; + $timeout = ""; + } elsif ($key =~ m/@?GRUB_HIDDEN_TIMEOUT$/) { + $line_ref->{"value"} = "$hidden_timeout" if "$hidden_timeout" ne ""; + $hidden_timeout = ""; + } elsif ($key =~ m/@?GRUB_SERIAL_COMMAND/) { + if ($serial eq "") { + $line_ref->{"key"} = '@GRUB_SERIAL_COMMAND'; + } else { + $line_ref->{"key"} = "GRUB_SERIAL_COMMAND"; + $line_ref->{"value"} = $serial; + $serial = ""; + } + } elsif ($key =~ m/@?GRUB_TERMINAL/) { + if ($terminal eq "") { + $line_ref->{"key"} = '@GRUB_TERMINAL'; + $line_ref->{"value"} = "console"; + } else { + $line_ref->{"key"} = "GRUB_TERMINAL"; + if ($terminal =~ m/^(serial|console|gfxterm)$/) { + $line_ref->{"value"} = "$terminal" if "$terminal" ne ""; + } + $terminal = ""; + } } defined $line_ref ? $line_ref : (); } @lines; @@ -805,6 +888,34 @@ } } + if ("$timeout" ne "") { + push @lines, { + "key" => "GRUB_TIMEOUT", + "value" => "$timeout", + } + } + + if ("$hidden_timeout" ne "") { + push @lines, { + "key" => "GRUB_HIDDEN_TIMEOUT", + "value" => "$hidden_timeout", + } + } + + if ($terminal ne "") { + push @lines, { + "key" => "GRUB_TERMINAL", + "value" => "$terminal", + } + } + + if ($serial ne "") { + push @lines, { + "key" => "GRUB_SERIAL_COMMAND", + "value" => "$serial", + } + } + return \@lines; } @@ -820,6 +931,24 @@ sub GetSettings { my $self = shift; my $ret = $self->SUPER::GetSettings (); + + my $sections = $ret->{"sections"}; + my $globals = $ret->{"global"}; + my $saved_entry = `/usr/bin/grub2-editenv list|sed -n '/^saved_entry=/s/.*=//p'`; + + chomp $saved_entry; + if ($saved_entry ne "") { + if ($saved_entry =~ m/^\d+$/) { + my $sect = $sections->[$saved_entry]; + + if (defined $sect) { + $globals->{"default"} = $sect->{"menuentry"}; + } + } else { + $globals->{"default"} = $saved_entry; + } + } + return $ret; } @@ -836,6 +965,16 @@ sub SetSettings { my $self = shift; my %settings = %{+shift}; + + my $default = delete $settings{"global"}->{"default"}; + + if (defined $default and $default ne "") { + $self->RunCommand ( + "/usr/sbin/grub2-set-default '$default'", + "/var/log/YaST2/y2log_bootloader" + ); + } + return $self->SUPER::SetSettings (\%settings); } @@ -890,13 +1029,19 @@ return undef; } - my $install_opts = "--force"; - my $skip_fs_probe = delete $glob{"boot_extended"}; - - if (defined $skip_fs_probe and $skip_fs_probe eq "true") { - $install_opts .= " --skip-fs-probe "; - } - + # Since Bootloader::Tools::ReadPartitions didn't assign + # correct part_type, the skip-fs-probe check based + # on `extended may not work. + + #my $skip_fs_probe = delete $glob{"boot_extended"}; + + #if (defined $skip_fs_probe and $skip_fs_probe eq "true") { + # $install_opts .= " --skip-fs-probe "; + #} + + # Do skip-fs-probe to avoid error when embedding stage1 + # to extended partition + my $install_opts = "--force --skip-fs-probe"; my @devices = @{$files_ref->{$file} || []}; # Hmm .. grub2-install must has been run before diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perl-Bootloader-0.6.1/src/Core/GRUB2EFI.pm new/perl-Bootloader-0.6.3/src/Core/GRUB2EFI.pm --- old/perl-Bootloader-0.6.1/src/Core/GRUB2EFI.pm 2012-03-30 11:47:45.000000000 +0200 +++ new/perl-Bootloader-0.6.3/src/Core/GRUB2EFI.pm 2012-04-27 12:07:25.000000000 +0200 @@ -87,7 +87,8 @@ sub ListFiles { my $self = shift; - return [ Bootloader::Path::Grub2_defaultconf() ]; + return [ Bootloader::Path::Grub2_defaultconf(), + Bootloader::Path::Grub2_eficonf() ]; } @@ -130,7 +131,17 @@ \@defaultconf ); + my @confs = @{$files{Bootloader::Path::Grub2_eficonf()} || []}; + my @entries = (); + foreach my $conf (@confs) { + if ($conf =~ /^menuentry\s+['"](.*)['"]\s+/) { + push @entries, { "menuentry" => $1 }; + } + } + $self->{"global"} = $glob_ref; + $self->{"sections"} = \@entries; + return 1; } @@ -192,6 +203,9 @@ my %ret = (); $ret{"__lines"} = \@lines; + my $timeout; + my $hidden_timeout; + foreach my $line_ref (@lines) { my $key = $line_ref->{"key"}; my $val = $line_ref->{"value"}; @@ -199,7 +213,7 @@ # Check if key is defined to prevent perl warnings next if (!defined($key)); - if ($key =~ m/@?GRUB_CMDLINE_LINUX_DEFAULT/) + if ($key =~ m/@?GRUB_CMDLINE_LINUX_DEFAULT$/) { if ($val =~ /^(?:(.*)\s+)?vga=(\S+)(?:\s+(.*))?$/) { @@ -208,6 +222,25 @@ } $ret{"append"} = $val; + } elsif ($key =~ m/@?GRUB_TIMEOUT$/) { + $timeout = $val; + } elsif ($key =~ m/@?GRUB_HIDDEN_TIMEOUT$/) { + $hidden_timeout = $val; + } + } + + if (defined $timeout) { + if ($timeout == 0) { + if (defined $hidden_timeout) { + $ret{"timeout"} = $hidden_timeout; + $ret{"hiddenmenu"} = "true"; + } else { + $ret{"timeout"} = $timeout; + $ret{"hiddenmenu"} = "true"; + } + } else { + $ret{"timeout"} = $timeout; + $ret{"hiddenmenu"} = "false"; } } @@ -250,7 +283,7 @@ }, { 'key' => 'GRUB_DEFAULT', - 'value' => '0', + 'value' => 'saved', }, { 'key' => 'GRUB_HIDDEN_TIMEOUT', @@ -327,18 +360,33 @@ # my $root = delete $globinfo{"root"} || ""; my $vga = delete $globinfo{"vgamode"} || ""; my $append = delete $globinfo{"append"} || ""; + my $timeout = delete $globinfo{"timeout"} || ""; + my $hiddenmenu = delete $globinfo{"hiddenmenu"} || ""; # $root = " root=$root" if $root ne ""; $vga = " vga=$vga" if $vga ne ""; $append = " $append" if $append ne ""; + my $hidden_timeout = "$timeout"; + if ("$hiddenmenu" eq "true") { + $timeout = "0" if "$timeout" ne ""; + } else { + $hidden_timeout = "0" if "$hidden_timeout" ne ""; + } + @lines = map { my $line_ref = $_; my $key = $line_ref->{"key"}; - if ($key =~ m/@?GRUB_CMDLINE_LINUX_DEFAULT/) + if ($key =~ m/@?GRUB_CMDLINE_LINUX_DEFAULT$/) { $line_ref->{"value"} = "$append$vga" if "$append$vga" ne ""; $append = ""; $vga = ""; + } elsif ($key =~ m/@?GRUB_TIMEOUT$/) { + $line_ref->{"value"} = "$timeout" if "$timeout" ne ""; + $timeout = ""; + } elsif ($key =~ m/@?GRUB_HIDDEN_TIMEOUT$/) { + $line_ref->{"value"} = "$hidden_timeout" if "$hidden_timeout" ne ""; + $hidden_timeout = ""; } defined $line_ref ? $line_ref : (); } @lines; @@ -350,6 +398,20 @@ } } + if ("$timeout" ne "") { + push @lines, { + "key" => "GRUB_TIMEOUT", + "value" => "$timeout", + } + } + + if ("$hidden_timeout" ne "") { + push @lines, { + "key" => "GRUB_HIDDEN_TIMEOUT", + "value" => "$hidden_timeout", + } + } + return \@lines; } @@ -365,6 +427,24 @@ sub GetSettings { my $self = shift; my $ret = $self->SUPER::GetSettings (); + + my $sections = $ret->{"sections"}; + my $globals = $ret->{"global"}; + my $saved_entry = `/usr/bin/grub2-efi-editenv list|sed -n '/^saved_entry=/s/.*=//p'`; + + chomp $saved_entry; + if ($saved_entry ne "") { + if ($saved_entry =~ m/^\d+$/) { + my $sect = $sections->[$saved_entry]; + + if (defined $sect) { + $globals->{"default"} = $sect->{"menuentry"}; + } + } else { + $globals->{"default"} = $saved_entry; + } + } + return $ret; } @@ -381,6 +461,16 @@ sub SetSettings { my $self = shift; my %settings = %{+shift}; + + my $default = delete $settings{"global"}->{"default"}; + + if (defined $default and $default ne "") { + $self->RunCommand ( + "/usr/sbin/grub2-efi-set-default '$default'", + "/var/log/YaST2/y2log_bootloader" + ); + } + return $self->SUPER::SetSettings (\%settings); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perl-Bootloader-0.6.1/src/Path.pm new/perl-Bootloader-0.6.3/src/Path.pm --- old/perl-Bootloader-0.6.1/src/Path.pm 2012-03-30 11:47:45.000000000 +0200 +++ new/perl-Bootloader-0.6.3/src/Path.pm 2012-04-27 12:07:25.000000000 +0200 @@ -282,4 +282,30 @@ my $value = "/etc/default/grub"; return Prefix($value); } + +=item +C<< $path = Bootloader::Path::Grub2_conf(); >> + +Gets path for grub configuration file grub +(this file contains commands for initialize bootloader). + +=cut + +sub Grub2_conf { + my $value = "/boot/grub2/grub.cfg"; + return Prefix($value); +} + +=item +C<< $path = Bootloader::Path::Grub2_eficonf(); >> + +Gets path for grub configuration file grub2-efi + +=cut + +sub Grub2_eficonf { + my $value = "/boot/grub2-efi/grub.cfg"; + return Prefix($value); +} + 1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perl-Bootloader-0.6.1/update-bootloader new/perl-Bootloader-0.6.3/update-bootloader --- old/perl-Bootloader-0.6.1/update-bootloader 2012-03-30 11:47:45.000000000 +0200 +++ new/perl-Bootloader-0.6.3/update-bootloader 2012-04-27 12:07:25.000000000 +0200 @@ -212,6 +212,16 @@ exit 0; } +if (Bootloader::Tools::GetBootloader() =~ /^(grub2|grub2-efi)$/) +{ + open (LOG, ">>$logname"); + print LOG ("grub2 bootloader, no add/remove section support\n"); + close LOG; + + delete $oper{add}; + delete $oper{remove}; +} + if ($opt_image and $opt_image !~ m;^/;) { $opt_image = getcwd . '/' . $opt_image } @@ -506,10 +516,8 @@ } if (defined $oper{refresh}) { - my $loader = Bootloader::Tools::GetBootloader(); - my $avoid_init = ($loader eq "grub2" || $loader eq "grub2-efi") ? 1 : 0; - - my $ret = UpdateBootloader($avoid_init); + # Always set $avoid_init=0 to guarentee bootloader installed (bnc#759224) + my $ret = UpdateBootloader(0); exit 1 if ( !$ret ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/perl-Bootloader-0.6.1/version new/perl-Bootloader-0.6.3/version --- old/perl-Bootloader-0.6.1/version 2012-03-30 11:47:45.000000000 +0200 +++ new/perl-Bootloader-0.6.3/version 2012-04-27 12:07:25.000000000 +0200 @@ -1 +1 @@ -0.6.1 +0.6.3 ++++++ update-bootloader ++++++ --- /var/tmp/diff_new_pack.QI5uiV/_old 2012-05-03 10:59:36.000000000 +0200 +++ /var/tmp/diff_new_pack.QI5uiV/_new 2012-05-03 10:59:36.000000000 +0200 @@ -212,6 +212,16 @@ exit 0; } +if (Bootloader::Tools::GetBootloader() =~ /^(grub2|grub2-efi)$/) +{ + open (LOG, ">>$logname"); + print LOG ("grub2 bootloader, no add/remove section support\n"); + close LOG; + + delete $oper{add}; + delete $oper{remove}; +} + if ($opt_image and $opt_image !~ m;^/;) { $opt_image = getcwd . '/' . $opt_image } @@ -506,10 +516,8 @@ } if (defined $oper{refresh}) { - my $loader = Bootloader::Tools::GetBootloader(); - my $avoid_init = ($loader eq "grub2" || $loader eq "grub2-efi") ? 1 : 0; - - my $ret = UpdateBootloader($avoid_init); + # Always set $avoid_init=0 to guarentee bootloader installed (bnc#759224) + my $ret = UpdateBootloader(0); exit 1 if ( !$ret ); } -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de