diff options
Diffstat (limited to 'perl-install/standalone/service_harddrake')
-rwxr-xr-x | perl-install/standalone/service_harddrake | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/perl-install/standalone/service_harddrake b/perl-install/standalone/service_harddrake index 535e6f753..870868c0c 100755 --- a/perl-install/standalone/service_harddrake +++ b/perl-install/standalone/service_harddrake @@ -34,12 +34,14 @@ $last_boot_config .= '_X11' if $invert_do_it; my $modules_conf = modules::any_conf->read; -# 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/; + +my %previous_kernel_config = getVarsFromSh("$hw_sysconfdir/kernel"); setVarsInSh("$hw_sysconfdir/kernel", { KERNEL => $curr_kernel }); -if ($curr_kernel ne $prev_kernel) { + +# autoreconfigure the mouse on major kernel change: +if ($curr_kernel ne $previous_kernel_config{KERNEL}) { log::explanations("Autoconfiguring mouse since we switched between 2.4.x and 2.6.x kernels"); harddrake::autoconf::mouse_conf($modules_conf); } @@ -118,7 +120,7 @@ foreach my $hw_class (@harddrake::data::tree) { @added || @was_removed or next; - next if $Ident eq 'MOUSE' && $curr_kernel ne $prev_kernel; + next if $Ident eq 'MOUSE' && $curr_kernel ne $previous_kernel_config{KERNEL}; my @configurator_pool; if (harddrake::data::is_removable($Ident)) { |