summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2009-10-28 16:39:29 +0000
committerThierry Vignaud <tv@mandriva.org>2009-10-28 16:39:29 +0000
commit69506ced2a36f8b6703c1f7518c08a417c542427 (patch)
treebcca635c2a267657c34fbe4eb037a530521ab74b /perl-install
parent4124c184b26056e4bda71fa1a7229ae161d03235 (diff)
downloaddrakx-69506ced2a36f8b6703c1f7518c08a417c542427.tar
drakx-69506ced2a36f8b6703c1f7518c08a417c542427.tar.gz
drakx-69506ced2a36f8b6703c1f7518c08a417c542427.tar.bz2
drakx-69506ced2a36f8b6703c1f7518c08a417c542427.tar.xz
drakx-69506ced2a36f8b6703c1f7518c08a417c542427.zip
(find_xorg_driver) split it out of switch_x_driver()
Diffstat (limited to 'perl-install')
-rwxr-xr-xperl-install/standalone/service_harddrake12
1 files changed, 9 insertions, 3 deletions
diff --git a/perl-install/standalone/service_harddrake b/perl-install/standalone/service_harddrake
index a3d3f7d15..a53aa9d55 100755
--- a/perl-install/standalone/service_harddrake
+++ b/perl-install/standalone/service_harddrake
@@ -75,11 +75,17 @@ sub schedule_warn_about_switch() {
}
my $lib = arch() =~ /x86_64/ ? "lib64" : "lib";
+
+sub find_xorg_driver {
+ my ($new_driver) = @_;
+ # nvidia driver has special place:
+ -e "/usr/$lib/xorg/modules/drivers/${new_driver}_drv.so"
+ || -e "/usr/$lib/xorg/extra-modules/${new_driver}_drv.so";
+}
+
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") {
+ if (!find_xorg_driver($new_driver)) {
log::explanations("would switch X.org driver from '$old_driver' to '$new_driver' ($reason); but new driver is not installed");
return;
}