summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-06-17 07:49:45 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-06-17 07:49:45 +0000
commit8cd07b985ce798656997caa9ae3239855fa47d2a (patch)
treeb697283eb75fd0e0e9210f46d6675ad6c27fc787 /perl-install/standalone
parente8081e4212aa8f04cbe88ef2296b88091d102b1f (diff)
downloaddrakx-8cd07b985ce798656997caa9ae3239855fa47d2a.tar
drakx-8cd07b985ce798656997caa9ae3239855fa47d2a.tar.gz
drakx-8cd07b985ce798656997caa9ae3239855fa47d2a.tar.bz2
drakx-8cd07b985ce798656997caa9ae3239855fa47d2a.tar.xz
drakx-8cd07b985ce798656997caa9ae3239855fa47d2a.zip
autoconfigure mouse when swtiching back between 2.4.x and 2.6.x kernels
Diffstat (limited to 'perl-install/standalone')
-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 47e0bcd98..6e95cfdf4 100755
--- a/perl-install/standalone/service_harddrake
+++ b/perl-install/standalone/service_harddrake
@@ -5,6 +5,7 @@ use lib qw(/usr/lib/libDrakX);
use strict;
use diagnostics;
use standalone; #- warning, standalone must be loaded very first, for 'explanations'
+use c;
use common;
use interactive;
use detect_devices;
@@ -21,6 +22,13 @@ $last_boot_config .= '_X11' if $invert_do_it;
modules::mergein_conf('/etc/modules.conf');
+# autoreconfigure the mouse on major kernel change:
+my $prev_kernel = { getVarsFromSh("$hw_sysconfdir/kernel") }->{KERNEL};
+my $curr_kernel = c::kernel_version();
+$curr_kernel =~ s/(^\d+\.\d+).*/\1/;
+setVarsInSh("$hw_sysconfdir/kernel", KERNEL => $curr_kernel);
+system("mousedrake --auto") if $curr_kernel ne $prev_kernel;
+
if (find { $_->{driver} =~ /Card:NVIDIA/ } detect_devices::probeall()) {
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)) {
# log::explanations("switch XFree86 driver from nv to nvidia");