From 58eab075319fcbb1377f50c701d7fb1cb805b95c Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 9 Sep 2004 09:56:04 +0000 Subject: - choose the good kernel for the box - add recognition of i586-up-1GB --- perl-install/pkgs.pm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index 9fbbed53f..e86876d70 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -175,7 +175,7 @@ sub packageById { } sub analyse_kernel_name { - $_[0] =~ /kernel[^\-]*(-enterprise|-i686-up-4GB|-p3-smp-64GB|-secure|-smp|-multimedia|-multimedia-smp)?(?:-([^\-]+))?$/; + $_[0] =~ /kernel[^\-]*(-enterprise|-i686-up-4GB|-i586-up-1GB|-p3-smp-64GB|-secure|-smp|-multimedia|-multimedia-smp)?(?:-([^\-]+))?$/; } sub packages2kernels { @@ -200,7 +200,12 @@ sub bestKernelPackage { #- favour versions corresponding to current BOOT version @kernels = @l; } - if (my @l = grep { $_->{ext} eq '' } @kernels) { + my $prefered_ext = + detect_devices::is_i586() || 1 ? 'i586-up-1GB' : + c::dmiDetectMemory() > 4 * 1024 ? 'enterprise' : + detect_devices::hasSMP() ? 'smp' : + ''; + if (my @l = grep { $_->{ext} eq $prefered_ext } @kernels) { @kernels = @l; } -- cgit v1.2.1