summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-10-28 16:25:28 +0000
committerThierry Vignaud <tv@mandriva.org>2009-10-28 16:25:28 +0000
commit1e57edef6df5245344784870bebba349c9451750 (patch)
tree40134f699f380af91afa51e199ea3a385de5ba6b /perl-install
parent0ca23c4869d779c99dd2b4af0f3e11a6f50f5a24 (diff)
downloaddrakx-1e57edef6df5245344784870bebba349c9451750.tar
drakx-1e57edef6df5245344784870bebba349c9451750.tar.gz
drakx-1e57edef6df5245344784870bebba349c9451750.tar.bz2
drakx-1e57edef6df5245344784870bebba349c9451750.tar.xz
drakx-1e57edef6df5245344784870bebba349c9451750.zip
(switch_x_driver) do not reconfigure to default driver if it's not installed
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS1
-rwxr-xr-xperl-install/standalone/service_harddrake7
2 files changed, 8 insertions, 0 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index b62145a58..b9c6819a2 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,6 +1,7 @@
- service_harddrake:
o fix detecting nvidia proprietary driver when checking if current
xorg driver still supports current card (#54943)
+ o do not reconfigure to default driver if it's not installed
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 9b1ac5274..a3d3f7d15 100755
--- a/perl-install/standalone/service_harddrake
+++ b/perl-install/standalone/service_harddrake
@@ -74,8 +74,15 @@ sub schedule_warn_about_switch() {
touch('/var/run/harddrake-notify-x11-free-driver-switch');
}
+my $lib = arch() =~ /x86_64/ ? "lib64" : "lib";
sub switch_x_driver {
my ($old_driver, $new_driver, $reason) = @_;
+ # nvidia driver has special place:
+ if (!-e "/usr/$lib/xorg/modules/drivers/${new_driver}_drv.so"
+ && !-e "/usr/$lib/xorg/extra-modules/${new_driver}_drv.so") {
+ log::explanations("would switch X.org driver from '$old_driver' to '$new_driver' ($reason); but new driver is not installed");
+ return;
+ }
cp_af('/etc/X11/xorg.conf', "/etc/X11/xorg.conf.mdv$^T");
substInFile { s!Driver "($old_driver)"!Driver "$new_driver"!g } '/etc/X11/xorg.conf';
log::explanations("switch X.org driver from '$old_driver' to '$new_driver' ($reason)");