summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/service_harddrake
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-06-18 04:27:40 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-06-18 04:27:40 +0000
commit0c7ab660185ddcd41bb6d72b34e311b189275a9d (patch)
treeb74f37ca54c0cdac851a29b9dd8fc72321d4dffa /perl-install/standalone/service_harddrake
parent973ae36df96d2ec5e8dc599ef1ec83a123f567e8 (diff)
downloaddrakx-backup-do-not-use-0c7ab660185ddcd41bb6d72b34e311b189275a9d.tar
drakx-backup-do-not-use-0c7ab660185ddcd41bb6d72b34e311b189275a9d.tar.gz
drakx-backup-do-not-use-0c7ab660185ddcd41bb6d72b34e311b189275a9d.tar.bz2
drakx-backup-do-not-use-0c7ab660185ddcd41bb6d72b34e311b189275a9d.tar.xz
drakx-backup-do-not-use-0c7ab660185ddcd41bb6d72b34e311b189275a9d.zip
merge mouse autoreconfiguration when switching between 2.4.x and 2.6.x kernels
from MDK-10-branch
Diffstat (limited to 'perl-install/standalone/service_harddrake')
-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 dad428021..c870be9fe 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");