summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2015-05-01 11:53:47 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2015-05-09 13:15:36 +0200
commit899bf269b69feae693e489e70bb63a0070dc58f1 (patch)
tree17d62afa676cf8771338b3f69890685542a5b95e /perl-install
parente60fe62ec144b31ad258f0865c54647ea9ed3409 (diff)
downloaddrakx-899bf269b69feae693e489e70bb63a0070dc58f1.tar
drakx-899bf269b69feae693e489e70bb63a0070dc58f1.tar.gz
drakx-899bf269b69feae693e489e70bb63a0070dc58f1.tar.bz2
drakx-899bf269b69feae693e489e70bb63a0070dc58f1.tar.xz
drakx-899bf269b69feae693e489e70bb63a0070dc58f1.zip
(get_grub2_append) split it
out of write_grub2() needed for next commit
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/bootloader.pm14
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};