From 8da7a0daa3cac2c0c0de09e6cea307bbf3c7ab48 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Fri, 20 Aug 2004 08:39:36 +0000 Subject: add matching_type() to introduce the TYPE keyword in rpmsrate (supports only laptop type for now) --- perl-install/detect_devices.pm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'perl-install/detect_devices.pm') diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 950a11462..dc30060bf 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -783,6 +783,11 @@ sub isLaptop() { || cat_('/proc/cpuinfo') =~ /\bmobile\b/i; } +sub matching_type { + my ($type) = @_; + $type =~ /laptop/i && isLaptop(); +} + sub usbMice() { grep { $_->{media_type} =~ /\|Mouse/ && $_->{driver} !~ /Tablet:wacom/ || $_->{driver} =~ /Mouse:USB/ } usb_probe() } sub usbWacom() { grep { $_->{driver} =~ /Tablet:wacom/ } usb_probe() } -- cgit v1.2.1