From 0c7ab660185ddcd41bb6d72b34e311b189275a9d Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 18 Jun 2004 04:27:40 +0000 Subject: merge mouse autoreconfiguration when switching between 2.4.x and 2.6.x kernels from MDK-10-branch --- perl-install/standalone/service_harddrake | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'perl-install/standalone/service_harddrake') 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"); -- cgit v1.2.1