summaryrefslogtreecommitdiffstats
path: root/perl-install/detect_devices.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-06-13 16:53:14 +0000
committerFrancois Pons <fpons@mandriva.com>2001-06-13 16:53:14 +0000
commit1207f6430d937e81552bdefe87196e649961a356 (patch)
tree04c4252f97025ab3d6f7a16c22b7d71fab333786 /perl-install/detect_devices.pm
parentbdc06e59473edf59c86b7cb83b4687645c4cd24c (diff)
downloaddrakx-backup-do-not-use-1207f6430d937e81552bdefe87196e649961a356.tar
drakx-backup-do-not-use-1207f6430d937e81552bdefe87196e649961a356.tar.gz
drakx-backup-do-not-use-1207f6430d937e81552bdefe87196e649961a356.tar.bz2
drakx-backup-do-not-use-1207f6430d937e81552bdefe87196e649961a356.tar.xz
drakx-backup-do-not-use-1207f6430d937e81552bdefe87196e649961a356.zip
fixed hasPCMCIA and added isLaptop to probe for problable laptop computer
(according to PCMCIA present or laptop graphics card).
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r--perl-install/detect_devices.pm11
1 files changed, 10 insertions, 1 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 0e44c63ac..769cd0fe5 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -249,7 +249,16 @@ sub syslog {
}
sub hasSMP { c::detectSMP() }
-sub hasPCMCIA { -e "/proc/pcmcia" }
+sub hasPCMCIA { $::o->{pcmcia} } #- because /proc/pcmcia seems not to be present on 2.4 at least (or use /var/run/stab)
+
+#- try to detect a laptop, we assume pcmcia service is an indication of a laptop or
+#- the following regexp to match graphics card apparently only used for such systems.
+sub isLaptop {
+ hasPCMCIA() || (matching_desc('C&T.*655[45]\d') || matching_desc('C&T.*68554') ||
+ matching_desc('Neomagic.*Magic(Media|Graph)') ||
+ matching_desc('ViRGE.MX') || matching_desc('S3.*Savage.*[IM]X') ||
+ matching_desc('ATI.*(Mobility|LT)'));
+}
sub hasUltra66 {
die "hasUltra66 deprecated";