summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-07-14 08:46:32 +0000
committerOlivier Blin <oblin@mandriva.org>2004-07-14 08:46:32 +0000
commit92641087df6f1c6cb43afd817a4cbfed5e90728e (patch)
tree911695f7686b608891d6974ca27e575ddaf1ea3d /perl-install/standalone
parent4e31976d5b266415fe7d8458aeafa65994254254 (diff)
downloaddrakx-backup-do-not-use-92641087df6f1c6cb43afd817a4cbfed5e90728e.tar
drakx-backup-do-not-use-92641087df6f1c6cb43afd817a4cbfed5e90728e.tar.gz
drakx-backup-do-not-use-92641087df6f1c6cb43afd817a4cbfed5e90728e.tar.bz2
drakx-backup-do-not-use-92641087df6f1c6cb43afd817a4cbfed5e90728e.tar.xz
drakx-backup-do-not-use-92641087df6f1c6cb43afd817a4cbfed5e90728e.zip
use bootloader and Xconfig instead of detect-resolution
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/drakboot24
1 files 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);