summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-10-28 19:00:48 +0000
committerThierry Vignaud <tv@mandriva.org>2009-10-28 19:00:48 +0000
commit12985c75853e726806bebf768bce0513921c97b2 (patch)
tree2e3078f1e54e41129964704f62b88ce373f9d7db /perl-install
parent4ca412082b05f28b727549339dfa20931dfa972a (diff)
downloaddrakx-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')
-rw-r--r--perl-install/NEWS1
-rwxr-xr-xperl-install/standalone/service_harddrake6
2 files changed, 7 insertions, 0 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 2512fbf36..82a413b19 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -13,6 +13,7 @@
/etc/sysconfig/harddrake2/service.conf
o fix detecting nvidia proprietary driver when checking if current
xorg driver still supports current card (#54943)
+ o auto reconfigure x11 only on first time default driver have changed
o reconfigure X11 driver if current X11 driver is neither one of
currently supported driver for the card for drivers other than ATI
& NVidia too (eg: poulsbo)
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;