diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/bootloader.pm | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 987cf4382..75785f3ce 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -1774,10 +1774,8 @@ sub crypt_grub_password { chomp_($res); } -sub write_grub2 { - my ($bootloader, $_all_hds, $o_backup_extension) = @_; - my $error; - +sub get_grub2_append { + my ($bootloader) = @_; # set default parameters: my ($entry) = grep { $_->{kernel_or_dev} =~ /vmlin/ } @{$bootloader->{entries}}; my $append = $entry->{append}; @@ -1787,10 +1785,16 @@ sub write_grub2 { $append =~ s/root=\S+//g; $append =~ s/\bro\b//g; $append =~ s/\s+/ /g; + $append; +} + +sub write_grub2 { + my ($bootloader, $_all_hds, $o_backup_extension) = @_; + my $error; my $f = "$::prefix/etc/default/grub"; my %conf = getVarsFromSh($f); - $conf{GRUB_CMDLINE_LINUX_DEFAULT} = $append; + $conf{GRUB_CMDLINE_LINUX_DEFAULT} = get_grub2_append($bootloader); $conf{GRUB_GFXPAYLOAD_LINUX} = 'auto' if is_uefi(); $conf{GRUB_DISABLE_RECOVERY} = 'false'; # for 'failsafe' entry $conf{GRUB_TIMEOUT} = $bootloader->{timeout}; |