diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-01-16 11:11:02 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-01-16 11:11:02 +0000 |
commit | dcedc30060f12a836733cb2eb949508d6df5e624 (patch) | |
tree | fbe2a6e8ff43defed6add95a921665ab8fd081ec /perl-install/Xconfig/main.pm | |
parent | 8828242570fd982a9f604771497a1fccec9fe8e1 (diff) | |
download | drakx-backup-do-not-use-dcedc30060f12a836733cb2eb949508d6df5e624.tar drakx-backup-do-not-use-dcedc30060f12a836733cb2eb949508d6df5e624.tar.gz drakx-backup-do-not-use-dcedc30060f12a836733cb2eb949508d6df5e624.tar.bz2 drakx-backup-do-not-use-dcedc30060f12a836733cb2eb949508d6df5e624.tar.xz drakx-backup-do-not-use-dcedc30060f12a836733cb2eb949508d6df5e624.zip |
for Driver fbdev, rework to allow configuring vga= in bootloader and telling to reboot instead of restarting X server (now i simply need to configure bootloader in Xconfig::main::write() when need_reboot)
Diffstat (limited to 'perl-install/Xconfig/main.pm')
-rw-r--r-- | perl-install/Xconfig/main.pm | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/perl-install/Xconfig/main.pm b/perl-install/Xconfig/main.pm index a794f3297..fbb65404a 100644 --- a/perl-install/Xconfig/main.pm +++ b/perl-install/Xconfig/main.pm @@ -20,7 +20,7 @@ sub configure_monitor { Xconfig::monitor::configure($in, $raw_X, int($raw_X->get_devices)) or return; if ($raw_X->prepare_write ne $before) { $raw_X->write; - 'config_changed'; + 'need_restart'; } else { ''; } @@ -29,13 +29,14 @@ sub configure_monitor { sub configure_resolution { my ($in, $raw_X) = @_; - my $card = Xconfig::card::from_raw_X($raw_X); - my $monitors = [ $raw_X->get_monitors ]; + my $X = { + card => Xconfig::card::from_raw_X($raw_X), + monitors => [ $raw_X->get_monitors ], + }; my $before = $raw_X->prepare_write; - Xconfig::resolution_and_depth::configure($in, $raw_X, $card, $monitors) or return; + $X->{resolution} = Xconfig::resolution_and_depth::configure($in, $raw_X, $X->{card}, $X->{monitors}) or return; if ($raw_X->prepare_write ne $before) { - $raw_X->write; - 'config_changed'; + &write($raw_X, $X); } else { ''; } @@ -51,10 +52,11 @@ sub configure_everything_auto_install { Xconfig::screen::configure($raw_X) or return; $X->{resolution} = Xconfig::resolution_and_depth::configure_auto_install($raw_X, $X->{card}, $X->{monitors}, $old_X); - &write($raw_X, $X); + my $action = &write($raw_X, $X); Xconfig::various::runlevel(exists $old_X->{xdm} && !$old_X->{xdm} ? 3 : 5); - 'config_changed'; + + $action; } sub configure_everything { @@ -76,9 +78,7 @@ sub configure_everything { } $X->{various} ||= Xconfig::various::various($in, $X->{card}, $options, $auto); - $ok = may_write($in, $raw_X, $X, $ok); - - $ok && 'config_changed'; + may_write($in, $raw_X, $X, $ok); } sub configure_chooser_raw { @@ -150,8 +150,7 @@ sub configure_chooser { my ($ok) = configure_chooser_raw($in, $raw_X, $do_pkgs, $options, $X); if ($raw_X->prepare_write ne $before) { - may_write($in, $raw_X, $X, $ok) or return; - 'config_changed'; + may_write($in, $raw_X, $X, $ok); } else { ''; } @@ -168,13 +167,14 @@ sub configure_everything_or_configure_chooser { $raw_X = []; } + my $rc; if (is_empty_array_ref($raw_X)) { $raw_X = Xconfig::default::configure($in->do_pkgs, $o_keyboard, $o_mouse); - Xconfig::main::configure_everything($in, $raw_X, $in->do_pkgs, $auto, $options) or return; - } else { - Xconfig::main::configure_chooser($in, $raw_X, $in->do_pkgs, $options) or return if !$auto; + $rc = Xconfig::main::configure_everything($in, $raw_X, $in->do_pkgs, $auto, $options); + } elsif (!$auto) { + $rc = Xconfig::main::configure_chooser($in, $raw_X, $in->do_pkgs, $options); } - $raw_X; + $rc && $raw_X, $rc; } @@ -186,24 +186,26 @@ The current configuration is: %s", Xconfig::various::info($raw_X, $X->{card})), 1); - &write($raw_X, $X) if $ok; - $ok; + $ok && &write($raw_X, $X); } sub write { my ($raw_X, $X) = @_; - export_to_install_X($X); + export_to_install_X($X) if $::isInstall; $raw_X->write; Xconfig::various::check_XF86Config_symlink(); symlinkf "../../usr/X11R6/bin/Xorg", "$::prefix/etc/X11/X"; + if ($X->{resolution}{bios}) { + 'need_reboot'; + } else { + 'need_restart'; + } } sub export_to_install_X { my ($X) = @_; - $::isInstall or return; - $::o->{X}{resolution_wanted} = $X->{resolution}{X}; $::o->{X}{default_depth} = $X->{resolution}{Depth}; $::o->{X}{bios_vga_mode} = $X->{resolution}{bios}; |