diff options
author | Thierry Vignaud <tv@mandriva.org> | 2009-10-28 19:00:48 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2009-10-28 19:00:48 +0000 |
commit | 12985c75853e726806bebf768bce0513921c97b2 (patch) | |
tree | 2e3078f1e54e41129964704f62b88ce373f9d7db /perl-install/standalone/service_harddrake | |
parent | 4ca412082b05f28b727549339dfa20931dfa972a (diff) | |
download | drakx-12985c75853e726806bebf768bce0513921c97b2.tar drakx-12985c75853e726806bebf768bce0513921c97b2.tar.gz drakx-12985c75853e726806bebf768bce0513921c97b2.tar.bz2 drakx-12985c75853e726806bebf768bce0513921c97b2.tar.xz drakx-12985c75853e726806bebf768bce0513921c97b2.zip |
auto reconfigure x11 only on first time default driver have changed
Diffstat (limited to 'perl-install/standalone/service_harddrake')
-rwxr-xr-x | perl-install/standalone/service_harddrake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/perl-install/standalone/service_harddrake b/perl-install/standalone/service_harddrake index b16df5901..d709a4fea 100755 --- a/perl-install/standalone/service_harddrake +++ b/perl-install/standalone/service_harddrake @@ -45,6 +45,7 @@ my $curr_kernel = c::kernel_version(); my ($kernel_major) = $curr_kernel =~ /^(\d+\.\d+)/; my %previous_kernel_config = getVarsFromSh("$hw_sysconfdir/kernel"); +my %previous_xorg_config = getVarsFromSh("$hw_sysconfdir/xorg"); setVarsInSh("$hw_sysconfdir/kernel", { KERNEL => $kernel_major, IS_LAPTOP => bool2text($isLaptop) }); my %cfg = getVarsFromSh("$hw_sysconfdir/service.conf"); @@ -128,6 +129,11 @@ foreach my $device (@devices) { # but really is just 'nvidia' in xorg.conf: $card_data->{Driver2} =~ s/(nvidia)-.*/$1/; + # auto reconfigure x11 only on first time default driver have changed: + my $new_key = $card_data->{Driver} . $card_data->{Driver2}; + setVarsInSh("$hw_sysconfdir/xorg", { XORG_DRV => $new_key }); + next if $previous_xorg_config{XORG_DRV} eq $new_key; + if (!member($current_driver, $card_data->{Driver}, $card_data->{Driver2}, 'fbdev', 'vesa')) { switch_x_driver($current_driver, $card_data->{Driver}, 'no more supported by this driver'); schedule_warn_about_switch() if any { $current_driver =~ $_->{xorg_driver_regexp} } @cards; |