diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-08-30 10:52:57 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-08-30 10:52:57 +0000 |
commit | 6774e3255b1db6b2a777db8b66c9744345e87004 (patch) | |
tree | d15cd507446cecc629b6e0107aecb610836ce7f6 /perl-install/bootloader.pm | |
parent | afba2d61cc1d9b7348649085815b8f4e08e088e6 (diff) | |
download | drakx-6774e3255b1db6b2a777db8b66c9744345e87004.tar drakx-6774e3255b1db6b2a777db8b66c9744345e87004.tar.gz drakx-6774e3255b1db6b2a777db8b66c9744345e87004.tar.bz2 drakx-6774e3255b1db6b2a777db8b66c9744345e87004.tar.xz drakx-6774e3255b1db6b2a777db8b66c9744345e87004.zip |
create suggest_message_text()
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r-- | perl-install/bootloader.pm | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index e296bb46c..e8f9db2e7 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -722,6 +722,25 @@ sub sanitize_ver { $return; } +sub suggest_message_text { + my ($bootloader) = @_; + + if (!$bootloader->{message} && !$bootloader->{message_text} && arch() !~ /ia64/) { + my $msg_en = +#-PO: these messages will be displayed at boot time in the BIOS, use only ASCII (7bit) +N_("Welcome to the operating system chooser! + +Choose an operating system from the list above or +wait for default boot. + +"); + my $msg = translate($msg_en); + #- use the english version if more than 20% of 8bits chars + $msg = $msg_en if int(grep { $_ & 0x80 } unpack "c*", $msg) / length($msg) > 0.2; + $bootloader->{message_text} = $msg; + } +} + sub suggest { my ($bootloader, $all_hds, %options) = @_; my $fstab = [ fs::get::fstab($all_hds) ]; @@ -759,20 +778,7 @@ sub suggest { ), }); - if (!$bootloader->{message} && !$bootloader->{message_text} && arch() !~ /ia64/) { - my $msg_en = -#-PO: these messages will be displayed at boot time in the BIOS, use only ASCII (7bit) -N_("Welcome to the operating system chooser! - -Choose an operating system from the list above or -wait for default boot. - -"); - my $msg = translate($msg_en); - #- use the english version if more than 20% of 8bits chars - $msg = $msg_en if int(grep { $_ & 0x80 } unpack "c*", $msg) / length($msg) > 0.2; - $bootloader->{message_text} = $msg; - } + suggest_message_text($bootloader); add2hash_($bootloader, { memsize => $1 }) if cat_("/proc/cmdline") =~ /\bmem=(\d+[KkMm]?)(?:\s.*)?$/; if (my ($s, $port, $speed) = cat_("/proc/cmdline") =~ /console=(ttyS(\d),(\d+)\S*)/) { |