summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-03-29 09:06:19 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-03-29 09:06:19 +0000
commit38463f40666f06faa930f6281400c26afc99f363 (patch)
tree783bc0e5152c6654c2f9a9c679cb86a09d558542 /perl-install/standalone
parent879688cd973ede9ce319335ef7f0552bf32080bd (diff)
downloaddrakx-38463f40666f06faa930f6281400c26afc99f363.tar
drakx-38463f40666f06faa930f6281400c26afc99f363.tar.gz
drakx-38463f40666f06faa930f6281400c26afc99f363.tar.bz2
drakx-38463f40666f06faa930f6281400c26afc99f363.tar.xz
drakx-38463f40666f06faa930f6281400c26afc99f363.zip
only alter xfree config if we found an nvidia card
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/service_harddrake13
1 files changed, 7 insertions, 6 deletions
diff --git a/perl-install/standalone/service_harddrake b/perl-install/standalone/service_harddrake
index b10d419d2..6379318c5 100755
--- a/perl-install/standalone/service_harddrake
+++ b/perl-install/standalone/service_harddrake
@@ -7,6 +7,7 @@ use diagnostics;
use standalone; #- warning, standalone must be loaded very first, for 'explanations'
use common;
use interactive;
+use detect_devices;
use harddrake::data;
use harddrake::sound;
use modules;
@@ -20,14 +21,14 @@ $last_boot_config .= '_X11' if $invert_do_it;
modules::mergein_conf('/etc/modules.conf');
-# we need to check if graphic card is managed by nv|nivdia first:
-if (find { -e join('', "/lib/modules/", c::kernel_version(), "/kernel/drivers/$_") } map { ("video/$_", "char/$_") } qw(NVdriver nvidia.o nvidia.o.gz nvidia.ko nvidia.ko.gz)) {
- substInFile { s!Driver "nv.*"!Driver "nvidia"!g; s!#*( Load.*glx)!\1!g } $_ foreach "/etc/X11/XF86Config-4", "/etc/X11/XF86Config";
-} else {
- substInFile { s!Driver "nv.*"!Driver "nv"!g;s!([^#]Load.*glx)!#\1!g } $_ foreach "/etc/X11/XF86Config-4", "/etc/X11/XF86Config";
+if (find { $_->{driver} =~ /Card:NVIDIA/ } detect_devices::probexall()) {
+ if (find { -e join('', "/lib/modules/", c::kernel_version(), "/kernel/drivers/$_") } map { ("video/$_", "char/$_") } qw(NVdriver nvidia.o nvidia.o.gz nvidia.ko nvidia.ko.gz)) {
+ substInFile { s!Driver "nv.*"!Driver "nvidia"!g; s!#*( Load.*glx)!\1!g } $_ foreach "/etc/X11/XF86Config-4", "/etc/X11/XF86Config";
+ } else {
+ substInFile { s!Driver "nv.*"!Driver "nv"!g;s!([^#]Load.*glx)!#\1!g } $_ foreach "/etc/X11/XF86Config-4", "/etc/X11/XF86Config";
+ }
}
-
# first run ? if not read old hw config
my $previous_config = -f $last_boot_config && -s $last_boot_config ? Storable::retrieve($last_boot_config) : {};
$previous_config = $$previous_config if ref($previous_config) !~ /HASH/;