diff options
-rw-r--r-- | perl-install/Xconfig/main.pm | 1 | ||||
-rw-r--r-- | perl-install/Xconfig/various.pm | 23 | ||||
-rw-r--r-- | perl-install/install_any.pm | 13 | ||||
-rw-r--r-- | perl-install/install_steps.pm | 6 |
4 files changed, 24 insertions, 19 deletions
diff --git a/perl-install/Xconfig/main.pm b/perl-install/Xconfig/main.pm index fbb65404a..a3398c80f 100644 --- a/perl-install/Xconfig/main.pm +++ b/perl-install/Xconfig/main.pm @@ -196,6 +196,7 @@ sub write { Xconfig::various::check_XF86Config_symlink(); symlinkf "../../usr/X11R6/bin/Xorg", "$::prefix/etc/X11/X"; if ($X->{resolution}{bios}) { + Xconfig::various::setupFB($X->{resolution}{bios}); 'need_reboot'; } else { 'need_restart'; diff --git a/perl-install/Xconfig/various.pm b/perl-install/Xconfig/various.pm index c1997fb5a..657c26b2f 100644 --- a/perl-install/Xconfig/various.pm +++ b/perl-install/Xconfig/various.pm @@ -149,4 +149,27 @@ sub check_XF86Config_symlink() { } } +sub setupFB { + my ($bios_vga_mode) = @_; + + require bootloader; + my ($bootloader, $all_hds); + + if ($::isInstall) { + ($bootloader, $all_hds) = ($::o->{bootloader}, $::o->{all_hds}); + } else { + $all_hds = fsedit::get_hds(); + fs::get_info_from_fstab($all_hds); + + $bootloader = bootloader::read($all_hds) or return; + } + + foreach (@{$bootloader->{entries}}) { + $_->{vga} = $bios_vga_mode if $_->{vga}; #- replace existing vga= with + } + + bootloader::action($bootloader, 'write', $all_hds); + bootloader::action($bootloader, 'when_config_changed'); +} + 1; diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index 87fbf4f78..0805b731f 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -835,19 +835,6 @@ sub ejectCdrom { sub warnAboutFilesStillOpen() { log::l("files still open: ", readlink($_)) foreach map { glob_("$_/fd/*") } glob_("/proc/*"); - } - -sub setupFB { - my ($o, $vga) = @_; - - $vga ||= 785; #- assume at least 640x480x16. - - require bootloader; - foreach (@{$o->{bootloader}{entries}}) { - $_->{vga} = $vga if $_->{vga}; #- replace existing vga= with - } - bootloader::install($o->{bootloader}, $o->{all_hds}); - 1; } sub install_urpmi { diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 528bb8334..0f937461c 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -875,12 +875,6 @@ sub configureX { } sub configureXAfter { my ($o) = @_; - if ($o->{X}{bios_vga_mode}) { - install_any::setupFB($o, $o->{X}{bios_vga_mode}) or do { - log::l("disabling automatic start-up of X11 if any as setup framebuffer failed"); - Xconfig::various::runlevel(3); #- disable automatic start-up of X11 on error. - }; - } if ($o->{X}{default_depth} >= 16 && $o->{X}{resolution_wanted} >= 1024) { log::l("setting large icon style for kde"); install_any::kderc_largedisplay($o->{prefix}); |