diff options
author | Olivier Blin <oblin@mandriva.org> | 2006-03-03 17:15:35 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2006-03-03 17:15:35 +0000 |
commit | 88259f712e60642bbd9917d53ca35fc38c4fbdde (patch) | |
tree | 7c3a60909b8e5b98a521d2f4b052da495ab6e536 | |
parent | b8bd775b5130b77409ed25512c7cb98176e5a6a1 (diff) | |
download | drakx-88259f712e60642bbd9917d53ca35fc38c4fbdde.tar drakx-88259f712e60642bbd9917d53ca35fc38c4fbdde.tar.gz drakx-88259f712e60642bbd9917d53ca35fc38c4fbdde.tar.bz2 drakx-88259f712e60642bbd9917d53ca35fc38c4fbdde.tar.xz drakx-88259f712e60642bbd9917d53ca35fc38c4fbdde.zip |
keep $hw_sysconfdir/kernel settings in a hash
-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)) { |