From 1207f6430d937e81552bdefe87196e649961a356 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Wed, 13 Jun 2001 16:53:14 +0000 Subject: fixed hasPCMCIA and added isLaptop to probe for problable laptop computer (according to PCMCIA present or laptop graphics card). --- perl-install/detect_devices.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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"; -- cgit v1.2.1