diff options
author | Pascal Terjan <pterjan@mandriva.org> | 2009-01-09 17:07:41 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mandriva.org> | 2009-01-09 17:07:41 +0000 |
commit | 01106b0f03fb64452642baaca1b6f9796041b0c0 (patch) | |
tree | b968b813a989ade711b15e76909f144494a099fa /perl-install/detect_devices.pm | |
parent | 68c07453441e577624eef0c5e145d727d5e511b6 (diff) | |
download | drakx-backup-do-not-use-01106b0f03fb64452642baaca1b6f9796041b0c0.tar drakx-backup-do-not-use-01106b0f03fb64452642baaca1b6f9796041b0c0.tar.gz drakx-backup-do-not-use-01106b0f03fb64452642baaca1b6f9796041b0c0.tar.bz2 drakx-backup-do-not-use-01106b0f03fb64452642baaca1b6f9796041b0c0.tar.xz drakx-backup-do-not-use-01106b0f03fb64452642baaca1b6f9796041b0c0.zip |
Try to detect servers
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r-- | perl-install/detect_devices.pm | 12 |
1 files changed, 12 insertions, 0 deletions
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; } |