diff options
author | Olivier Blin <oblin@mandriva.org> | 2004-08-13 12:47:41 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2004-08-13 12:47:41 +0000 |
commit | a3156c9f8c3d16c43419dc7a217c8e932259c475 (patch) | |
tree | 58866aad568825d7b9d9c23c5e7f08883062843f /perl-install/standalone/drakboot | |
parent | 854ec6eb4cd6a89e07170e0ee1a50ababb09f256 (diff) | |
download | drakx-backup-do-not-use-a3156c9f8c3d16c43419dc7a217c8e932259c475.tar drakx-backup-do-not-use-a3156c9f8c3d16c43419dc7a217c8e932259c475.tar.gz drakx-backup-do-not-use-a3156c9f8c3d16c43419dc7a217c8e932259c475.tar.bz2 drakx-backup-do-not-use-a3156c9f8c3d16c43419dc7a217c8e932259c475.tar.xz drakx-backup-do-not-use-a3156c9f8c3d16c43419dc7a217c8e932259c475.zip |
(drakboot --splash) add enable_framebuffer to allow to choose a video
mode if boot isn't graphical
Diffstat (limited to 'perl-install/standalone/drakboot')
-rwxr-xr-x | perl-install/standalone/drakboot | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/perl-install/standalone/drakboot b/perl-install/standalone/drakboot index 0b0fb92e3..9ed379cdd 100755 --- a/perl-install/standalone/drakboot +++ b/perl-install/standalone/drakboot @@ -154,7 +154,7 @@ gtkadd($window, if ($in->ask_yesorno(N("Warning"), [ N("Your system bootloader is not in framebuffer mode. To activate graphical boot, select a graphic video mode from the bootloader configuration tool.") . "\n" . N("Do you want to configure it now ?") ])) { - lilo_choice(); + enable_framebuffer(); #- it would be nice to get available themes for new cur_res here $splash_mode = 1 }; @@ -294,3 +294,41 @@ sub change_image { $boot_pixbuf = $boot_pixbuf->scale_simple(300, 200, 'nearest'); $boot_pic->set_from_pixbuf($boot_pixbuf); } + +sub enable_framebuffer() { + my $vga = Xconfig::resolution_and_depth::from_bios($bootloader->{default_vga}); + my ($current_entry) = cat_('/proc/cmdline') =~ /^BOOT_IMAGE=(\S+)/; + my %entries = ( + $current_entry => 1 + ); + local $::isWizard = 1; + local $::Wizard_no_previous = 1; + local $::Wizard_finished = 1; + $::Wizard_title = N("Boot Style Configuration"); + eval { + $in->ask_from(N("Video mode"), + N("Please choose a video mode, it will be applied to each of the boot entries selected below. +Be sure your video card supports the mode you choose."), + [ + { label => N("Video mode"), val => \$vga, + list => [ '', Xconfig::resolution_and_depth::bios_vga_modes() ], + format => \&Xconfig::resolution_and_depth::to_string + }, + map { + { text => $_->{label}, val => \$entries{$_->{label}}, type => 'bool' } + } grep { $_->{label} !~ /failsafe|floppy|memtest/ } @{$bootloader->{entries}} + ]); + if ($vga) { + $vga = $vga->{bios} if ref($vga); + while (my ($label, $e) = each %entries) { + $e or next; + my $entry = find { $_->{label} eq $label } @{$bootloader->{entries}}; + $entry->{vga} = $vga; + } + bootloader::install($bootloader, $all_hds); + } + }; + die if $@ && $@ !~ /^wizcancel/; + $::WizardWindow->destroy; + return $vga; +} |