diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-10-11 23:56:40 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-10-11 23:56:40 +0000 |
commit | 5257a4b51da873ea3f3b5e25e7822930f6433489 (patch) | |
tree | 587b009adac3aba74d2da1515b84afb411e789b6 | |
parent | 7304abed8e5b1fba67d263f27fc6397fb0c2ff75 (diff) | |
download | drakx-5257a4b51da873ea3f3b5e25e7822930f6433489.tar drakx-5257a4b51da873ea3f3b5e25e7822930f6433489.tar.gz drakx-5257a4b51da873ea3f3b5e25e7822930f6433489.tar.bz2 drakx-5257a4b51da873ea3f3b5e25e7822930f6433489.tar.xz drakx-5257a4b51da873ea3f3b5e25e7822930f6433489.zip |
in grub menu.lst, keep previous "serial ..." and "terminal ..." lines (bugzilla #12054)
-rw-r--r-- | perl-install/bootloader.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 83e4fbf95..d1a0b08e9 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -1170,6 +1170,11 @@ sub write_grub { my @sorted_hds = sort_hds_according_to_bios($bootloader, $all_hds); write_grub_device_map(\@legacy_floppies, \@sorted_hds); + if (get_append($bootloader, 'console') =~ /ttyS(\d),(\d+)/) { + $bootloader->{serial} ||= "--unit=$1 --speed=$2"; + $bootloader->{terminal} ||= "--timeout=" . ($bootloader->{timeout} || 0) . " console serial"; + } + my $file2grub = sub { my ($part, $file) = fs::get::file2part($fstab, $_[0], 'keep_simple_symlinks'); device2grub($part, \@sorted_hds) . $file; @@ -1177,9 +1182,8 @@ sub write_grub { { my @conf; - push @conf, map { "$_ $bootloader->{$_}" } grep { $bootloader->{$_} } qw(timeout color); + push @conf, map { "$_ $bootloader->{$_}" } grep { $bootloader->{$_} } qw(timeout color serial terminal); push @conf, map { $_ . ' ' . $file2grub->($bootloader->{$_}) } grep { $bootloader->{$_} } qw(splashimage); - push @conf, "serial --unit=$1 --speed=$2\nterminal --timeout=" . ($bootloader->{timeout} || 0) . " console serial" if get_append($bootloader, 'console') =~ /ttyS(\d),(\d+)/; eval { push @conf, "default " . (find_index { $_->{label} eq $bootloader->{default} } @{$bootloader->{entries}}); |