summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-09-01 16:33:00 +0000
committerOlivier Blin <oblin@mandriva.com>2008-09-01 16:33:00 +0000
commite9ea24da4256078d965c699d5b026820caf8bbd6 (patch)
tree058d7b0990b29e79dc1ea6737b798c8aaf7bf1d1
parentf5647e17e10a87a233493899492ebf8de933303f (diff)
downloaddrakx-e9ea24da4256078d965c699d5b026820caf8bbd6.tar
drakx-e9ea24da4256078d965c699d5b026820caf8bbd6.tar.gz
drakx-e9ea24da4256078d965c699d5b026820caf8bbd6.tar.bz2
drakx-e9ea24da4256078d965c699d5b026820caf8bbd6.tar.xz
drakx-e9ea24da4256078d965c699d5b026820caf8bbd6.zip
keep full kernel version and use another variable for kernel major
-rwxr-xr-xperl-install/standalone/service_harddrake6
1 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/standalone/service_harddrake b/perl-install/standalone/service_harddrake
index 7264b9bd4..8c6464a1a 100755
--- a/perl-install/standalone/service_harddrake
+++ b/perl-install/standalone/service_harddrake
@@ -28,10 +28,10 @@ my $modules_conf = modules::any_conf->read;
my $isLaptop = detect_devices::isLaptop();
my $curr_kernel = c::kernel_version();
-$curr_kernel =~ s/(^\d+\.\d+).*/$1/;
+my ($kernel_major) = $curr_kernel =~ /(^\d+\.\d+).*/;
my %previous_kernel_config = getVarsFromSh("$hw_sysconfdir/kernel");
-setVarsInSh("$hw_sysconfdir/kernel", { KERNEL => $curr_kernel, IS_LAPTOP => bool2text($isLaptop) });
+setVarsInSh("$hw_sysconfdir/kernel", { KERNEL => $kernel_major, IS_LAPTOP => bool2text($isLaptop) });
my %cfg = getVarsFromSh("$hw_sysconfdir/service.conf");
# autoreconfigure laptop-dependent services when switching from laptop to desktop, and vice versa
@@ -139,7 +139,7 @@ foreach my $hw_class (@harddrake::data::tree) {
@added || @was_removed or $cfg{"DETECT_$Ident"} ne 'force' and next;
- next if $Ident eq 'MOUSE' && $curr_kernel ne $previous_kernel_config{KERNEL} && $cfg{"DETECT_$Ident"} ne 'force';
+ next if $Ident eq 'MOUSE' && $kernel_major ne $previous_kernel_config{KERNEL} && $cfg{"DETECT_$Ident"} ne 'force';
my @configurator_pool;
if (harddrake::data::is_auto_configurable_class($Ident)) {