summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/bootloader.pm24
-rw-r--r--perl-install/install_steps.pm6
2 files changed, 19 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);
diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm
index 4f345bd63..a3a212689 100644
--- a/perl-install/install_steps.pm
+++ b/perl-install/install_steps.pm
@@ -782,6 +782,12 @@ sub setupBootloaderBefore {
require bootloader;
+ #- auto_install backward compatibility
+ #- one should now use {message_text}
+ if ($o->{bootloader}{message} =~ m!^[^/]!) {
+ $o->{bootloader}{message_text} = delete $o->{bootloader}{message};
+ }
+
#- remove previous ide-scsi lines
bootloader::modify_append($o->{bootloader}, sub {
my ($_simple, $dict) = @_;