diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-06-06 04:35:16 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-06-06 04:35:16 +0000 |
commit | f49d1995e8d402461242500a50ae724ffb9ab176 (patch) | |
tree | 85b1d68cc42ac8f4d453dc49525bd75434a479f4 /perl-install/bootloader.pm | |
parent | 7a8650bf7aa5ddf751bbc32ded553a84bfde2186 (diff) | |
download | drakx-backup-do-not-use-f49d1995e8d402461242500a50ae724ffb9ab176.tar drakx-backup-do-not-use-f49d1995e8d402461242500a50ae724ffb9ab176.tar.gz drakx-backup-do-not-use-f49d1995e8d402461242500a50ae724ffb9ab176.tar.bz2 drakx-backup-do-not-use-f49d1995e8d402461242500a50ae724ffb9ab176.tar.xz drakx-backup-do-not-use-f49d1995e8d402461242500a50ae724ffb9ab176.zip |
use bootloader->{message_text} instead of bootloader->{message}
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r-- | perl-install/bootloader.pm | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 1b1428b38..853464941 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -332,7 +332,6 @@ sub read_lilo() { delete $b{timeout} unless $b{prompt}; $b{timeout} = $b{timeout} / 10 if $b{timeout}; $b{method} = 'lilo-' . (member($b{install}, 'text', 'menu', 'graphic') ? $b{install} : 'graphic'); - delete $b{message}; } #- cleanup duplicate labels & bad entries (in case file is corrupted) @@ -735,10 +734,11 @@ sub suggest { boot => "/dev/" . ($onmbr ? $all_hds->{hds}[0]{device} : $boot), map => "/boot/map", color => 'black/cyan yellow/cyan', + 'menu-scheme' => 'wb:bw:wb:bw' ), }); - if (!$bootloader->{message} || $bootloader->{message} eq "1") { + 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! @@ -750,7 +750,7 @@ 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} = $msg; + $bootloader->{message_text} = $msg; } add2hash_($bootloader, { memsize => $1 }) if cat_("/proc/cmdline") =~ /\bmem=(\d+[KkMm]?)(?:\s.*)?$/; @@ -939,9 +939,9 @@ sub write_yaboot { $bootloader->{prompt} ||= $bootloader->{timeout}; - if ($bootloader->{message}) { - eval { output("$::prefix/boot/message", $bootloader->{message}) } - or $bootloader->{message} = 0; + if ($bootloader->{message_text}) { + eval { output("$::prefix/boot/message", $bootloader->{message_text}) } + and $bootloader->{message} = '/boot/message'; } my @conf; @@ -1072,15 +1072,14 @@ sub write_lilo { push @conf, "# File generated by DrakX/drakboot"; push @conf, "# WARNING: do not forget to run lilo after modifying this file\n"; push @conf, "default=" . make_label_lilo_compatible($bootloader->{default}) if $bootloader->{default}; - push @conf, map { "$_=$bootloader->{$_}" } grep { $bootloader->{$_} } qw(boot root map install vga keytable raid-extra-boot); + push @conf, map { "$_=$bootloader->{$_}" } grep { $bootloader->{$_} } qw(boot root map install vga keytable raid-extra-boot menu-scheme); push @conf, grep { $bootloader->{$_} } qw(linear geometric compact prompt nowarn restricted static-bios-codes); push @conf, qq(append="$bootloader->{append}") if $bootloader->{append}; push @conf, "password=" . $bootloader->{password} if $bootloader->{password}; #- also done by msec push @conf, "timeout=" . round(10 * $bootloader->{timeout}) if $bootloader->{timeout}; push @conf, "serial=" . $1 if get_append_with_key($bootloader, 'console') =~ /ttyS(.*)/; - push @conf, "message=/boot/message" if arch() !~ /ia64/; - push @conf, "menu-scheme=wb:bw:wb:bw" if arch() !~ /ia64/; + push @conf, "message=$bootloader->{message}" if $bootloader->{message}; push @conf, "ignore-table" if any { $_->{unsafe} && $_->{table} } @{$bootloader->{entries}}; @@ -1137,8 +1136,11 @@ sub install_lilo { } else { delete $bootloader->{install}; } - output("$::prefix/boot/message-text", $bootloader->{message}) if $bootloader->{message}; - symlinkf "message-" . ($bootloader->{method} ne 'lilo-graphic' ? 'text' : 'graphic'), "$::prefix/boot/message"; + if ($bootloader->{message_text}) { + output("$::prefix/boot/message-text", $bootloader->{message_text}); + symlinkf "message-" . ($bootloader->{method} ne 'lilo-graphic' ? 'text' : 'graphic'), "$::prefix/boot/message"; + $bootloader->{message} = '/boot/message'; + } write_lilo($bootloader, $all_hds); |