summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/service_harddrake8
1 files changed, 7 insertions, 1 deletions
diff --git a/perl-install/standalone/service_harddrake b/perl-install/standalone/service_harddrake
index a9b8fe8d2..fbe854c2b 100755
--- a/perl-install/standalone/service_harddrake
+++ b/perl-install/standalone/service_harddrake
@@ -38,7 +38,7 @@ my $modules_conf = modules::any_conf->read;
my $isLaptop = detect_devices::isLaptop();
my $curr_kernel = c::kernel_version();
-my ($kernel_major) = $curr_kernel =~ /(^\d+\.\d+).*/;
+my ($kernel_major) = $curr_kernel =~ /^(\d+\.\d+)/;
my %previous_kernel_config = getVarsFromSh("$hw_sysconfdir/kernel");
setVarsInSh("$hw_sysconfdir/kernel", { KERNEL => $kernel_major, IS_LAPTOP => bool2text($isLaptop) });
@@ -50,6 +50,12 @@ if (!exists $previous_kernel_config{IS_LAPTOP} || $force || $isLaptop != text2bo
harddrake::autoconf::laptop($isLaptop);
}
+my $known_kernels = "$hw_sysconfdir/kernels";
+if (!member($curr_kernel, chomp_(cat_($known_kernels)))) {
+ harddrake::autoconf::fix_aliases($modules_conf) if !$first_run;
+ append_to_file($known_kernels, "$curr_kernel\n");
+}
+
my @cards = (
{
ldetect_driver_regexp => 'Card:NVIDIA',