From 92641087df6f1c6cb43afd817a4cbfed5e90728e Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Wed, 14 Jul 2004 08:46:32 +0000 Subject: use bootloader and Xconfig instead of detect-resolution --- perl-install/standalone/drakboot | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/perl-install/standalone/drakboot b/perl-install/standalone/drakboot index 516252c3b..75793f5d8 100755 --- a/perl-install/standalone/drakboot +++ b/perl-install/standalone/drakboot @@ -41,6 +41,12 @@ my $splash_working = any { /^--splash$/ } @ARGV; my $in = 'interactive'->vnew('su'); +my $all_hds = fsedit::get_hds(); +fs::get_raw_hds('', $all_hds); +fs::get_info_from_fstab($all_hds, ''); +my $fstab = [ fsedit::get_all_fstab($all_hds) ]; +my $bootloader = bootloader::read($fstab); + if (!$in->isa('interactive::gtk') || any { /^--boot$/ } @ARGV) { $::isWizard = 1; lilo_choice(); @@ -92,10 +98,12 @@ my %themes = ('path' => '/usr/share/bootsplash/themes/', my $kernel_release = `uname -r`; chomp $kernel_release; my $initrd = "/boot/initrd-$kernel_release.img" if -f "/boot/initrd-$kernel_release.img"; -my $cur_res = `/usr/share/bootsplash/scripts/detect-resolution $initrd`; -$cur_res =~ m/(\d+x\d+)x\d+/ and $cur_res = $1; -#- verify that current resolution is ok -if (!$cur_res) { + +require Xconfig::resolution_and_depth; +my $cur_res; +if (my $x_res = Xconfig::resolution_and_depth::from_bios($bootloader->{default_vga})) { + $cur_res = $x_res->{X} . 'x' . $x_res->{Y}; +} else { $no_bootsplash = 1; #- we can't select any theme we're not in Framebuffer mode :-/ $cur_res = '800x600' } @@ -234,15 +242,7 @@ $w->main; $in->exit(0); - sub lilo_choice() { - my $all_hds = fsedit::get_hds(); - fs::get_raw_hds('', $all_hds); - fs::get_info_from_fstab($all_hds, ''); - my $fstab = [ fsedit::get_all_fstab($all_hds) ]; - - my $bootloader = bootloader::read($fstab); - ask: eval { my $before = fs::fstab_to_string($all_hds); -- cgit v1.2.1