diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-10-02 10:40:42 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-10-02 10:40:42 +0000 |
commit | 5cb13bdecad5a9e707cc6a11f5082795da1b80e2 (patch) | |
tree | 8ad87f49e5dc716284ad185c86fe15f400248745 | |
parent | a763742ee2a460cd399557c52b9adad489418de5 (diff) | |
download | drakx-5cb13bdecad5a9e707cc6a11f5082795da1b80e2.tar drakx-5cb13bdecad5a9e707cc6a11f5082795da1b80e2.tar.gz drakx-5cb13bdecad5a9e707cc6a11f5082795da1b80e2.tar.bz2 drakx-5cb13bdecad5a9e707cc6a11f5082795da1b80e2.tar.xz drakx-5cb13bdecad5a9e707cc6a11f5082795da1b80e2.zip |
allow detection of low resources systems (extracted from compssUsers.pl) and netbooks/nettops
-rw-r--r-- | perl-install/NEWS | 3 | ||||
-rw-r--r-- | perl-install/detect_devices.pm | 14 | ||||
-rw-r--r-- | perl-install/install/NEWS | 3 |
3 files changed, 20 insertions, 0 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS index 3263a6fbf..8465c5309 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,3 +1,6 @@ +- detect_devices: allow detection of low resources systems (extracted + from compssUsers.pl) and netbooks/nettops + Version 11.63 - 1 October 2008 - bootloader-config (and other tools): handle /dev/mapper/xxx1 instead of diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 7948cc649..b2083ca60 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -1085,6 +1085,20 @@ sub is_virtualbox() { any { $_->{driver} eq 'vboxadd' } detect_devices::pci_probe(); } +sub is_netbook_nettop() { + my @cpus = getCPUs(); + (any { $_->{'model name'} =~ /(\bIntel\(R\) Atom\(TM\)\B)/i } @cpus) || + (any { $_->{'model name'} =~ /(\bIntel\(R\) Celeron\(R\) M processor\b|\bVIA C7-M Processor\b|\bGeode\(TM\)\B)/i && $_->{'cpu MHz'} < 1500 } @cpus); +} + +sub has_low_resources() { + availableRamMB() < 100 || arch() =~ /i.86/ && ix86_cpu_frequency() < 350; +} + +sub need_light_desktop() { + has_low_resources() || is_netbook_nettop(); +} + sub has_cpu_flag { my ($flag) = @_; cat_('/proc/cpuinfo') =~ /^flags.*\b$flag\b/m; diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 34b141836..2d518f6b0 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,3 +1,6 @@ +- detect_devices: allow detection of low resources systems (extracted + from compssUsers.pl) and netbooks/nettops + Version 11.65 - 2 October 2008 - add help button to desktop selection & minimal installation steps |