summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-03-24 09:59:46 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-03-24 09:59:46 +0000
commitb91b2b053ed9d07723ad088e09be525a24e3945d (patch)
tree8be1666a1fbbb7e35dc5a9da288c651f241d9f19 /perl-install
parent26be3bdacf88c2c112c02aee4f7e02496733c99e (diff)
downloaddrakx-b91b2b053ed9d07723ad088e09be525a24e3945d.tar
drakx-b91b2b053ed9d07723ad088e09be525a24e3945d.tar.gz
drakx-b91b2b053ed9d07723ad088e09be525a24e3945d.tar.bz2
drakx-b91b2b053ed9d07723ad088e09be525a24e3945d.tar.xz
drakx-b91b2b053ed9d07723ad088e09be525a24e3945d.zip
switch between nv and nvidia driver if commercial driver isn't installed
Diffstat (limited to 'perl-install')
-rwxr-xr-xperl-install/standalone/service_harddrake8
1 files changed, 8 insertions, 0 deletions
diff --git a/perl-install/standalone/service_harddrake b/perl-install/standalone/service_harddrake
index 6ae94cade..7a1731c70 100755
--- a/perl-install/standalone/service_harddrake
+++ b/perl-install/standalone/service_harddrake
@@ -20,6 +20,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/video/$_") } qw(NVdriver vidia.ko)) {
+ 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/;