diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/NEWS | 2 | ||||
-rw-r--r-- | perl-install/detect_devices.pm | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS index 32a46962f..031e91729 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,3 +1,5 @@ +- detect_devices: + o try to detect servers (isServer) - diskdrake: o --smb: cifs must be used instead of smbfs (#42483) diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 3e057d28f..35349ee7c 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -1046,6 +1046,7 @@ sub computer_info() { +{ isLaptop => member($Chassis, 'Portable', 'Laptop', 'Notebook', 'Hand Held', 'Sub Notebook', 'Docking Station'), + isServer => member($Chassis, 'Pizza Box', 'Main Server Chassis', 'Blade'), if_($BIOS_Year, BIOS_Year => $BIOS_Year), }; } @@ -1068,6 +1069,17 @@ sub isLaptop() { || (any { member($_->{driver}, qw(ipw2100 ipw2200 ipw3945)) } pci_probe()); } +sub isServer() { + computer_info()->{isServer} + || (any { $_->{Type} =~ /ECC/ } dmidecode_category('Memory Module')) + || dmidecode_category('System Information')->{Manufacturer} =~ /Supermicro/i + || dmidecode_category('System Information')->{'Product Name'} =~ /NetServer|Proliant|PowerEdge|eServer|IBM System x/i + || matching_desc__regexp('LSI Logic.*SCSI') + || matching_desc__regexp('MegaRAID') + || matching_desc__regexp('NetServer') + || (any { $_->{'model name'} =~ /(Xeon|Opteron)/i } getCPUs()); +} + sub BIGMEM() { arch() !~ /x86_64|ia64/ && $> == 0 && dmi_detect_memory() > 4 * 1024; } |