diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/NEWS | 1 | ||||
-rw-r--r-- | perl-install/bootloader.pm | 12 | ||||
-rw-r--r-- | perl-install/install/NEWS | 1 |
3 files changed, 14 insertions, 0 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS index 321c85543..853bcecd4 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,6 +1,7 @@ - drakboot: o fix detecting grub2 if there's a remaining grub-legacy signature o read more of grub2 config + o set default parameters in grub2 config (mga#9177) Version 15.21 - 26 February 2013 diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index f7d13ac5c..0a3363d52 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -1794,6 +1794,18 @@ sub crypt_grub_password { sub write_grub2 { my ($bootloader, $_all_hds, $o_backup_extension) = @_; my $error; + + # set default parameters: + my ($entry) = grep { $_->{kernel_or_dev} =~ /vmlin/ } @{$bootloader->{entries}}; + my $append = $entry->{append}; + $append =~ s/root=\S+//; + $append =~ s/\bro\b//; + + my $f = "$::prefix/etc/default/grub"; + my %conf = getVarsFromSh($f); + $conf{GRUB_CMDLINE_LINUX_DEFAULT} = $append; + setVarsInSh($f, \%conf); + my $grub2_cfg = '/boot/grub2/grub.cfg'; run_program::rooted($::prefix, 'grub2-mkconfig', '2>', \$error, '-o', $grub2_cfg) or die "grub2-mkconfig failed: $error"; } diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 1f5055a68..b77bb223f 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,6 +1,7 @@ - bootloader: o fix detecting grub2 if there's a remaining grub-legacy signature o read more of grub2 config + o set default parameters in grub2 config (mga#9177) - do not attempt to use gurpmi.addmedia or gurpmi if in text mode Version 15.22 - 26 February 2013 |