summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@mandriva.com>2009-05-04 16:06:06 +0000
committerChristophe Fergeau <cfergeau@mandriva.com>2009-05-04 16:06:06 +0000
commit0564c8d123e0966fdd2b4989783c62bca35988d2 (patch)
treedb14a3f9ed10a3a3d5e45b9997c0e6b5ab935de9 /perl-install
parent31e10542594e47573b9eaac143874d4bb0ed0ec9 (diff)
downloaddrakx-backup-do-not-use-0564c8d123e0966fdd2b4989783c62bca35988d2.tar
drakx-backup-do-not-use-0564c8d123e0966fdd2b4989783c62bca35988d2.tar.gz
drakx-backup-do-not-use-0564c8d123e0966fdd2b4989783c62bca35988d2.tar.bz2
drakx-backup-do-not-use-0564c8d123e0966fdd2b4989783c62bca35988d2.tar.xz
drakx-backup-do-not-use-0564c8d123e0966fdd2b4989783c62bca35988d2.zip
Add detect_devices::hasTouchpad() function
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/detect_devices.pm2
-rw-r--r--perl-install/modules.pm3
2 files changed, 4 insertions, 1 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index dce726063..4bc2a0928 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -1143,6 +1143,8 @@ sub matching_types() {
}
sub hasWacom() { find { $_->{vendor} == 0x056a || $_->{driver} =~ /wacom/ } usb_probe() }
+sub hasTouchpad() { any { $_->{Synaptics} || $_->{ALPS} || $_->{Elantech} } getInputDevices() };
+
sub usbWacom() { grep { $_->{vendor} eq '056a' } getInputDevices() }
sub usbKeyboards() { grep { $_->{media_type} =~ /\|Keyboard/ } usb_probe() }
sub usbStorage() { grep { $_->{media_type} =~ /Mass Storage\|/ } usb_probe() }
diff --git a/perl-install/modules.pm b/perl-install/modules.pm
index f6e481973..e1ad11906 100644
--- a/perl-install/modules.pm
+++ b/perl-install/modules.pm
@@ -192,7 +192,8 @@ sub write_preload_conf {
push @l, 'nvram' if $is_laptop;
push @l, map { $_->{driver} } detect_devices::probe_category($_) foreach qw(multimedia/dvb multimedia/tv various/agpgart various/laptop input/joystick various/crypto disk/card_reader);
push @l, 'padlock-aes', 'padlock-sha' if cat_("/proc/cpuinfo") =~ /rng_en/;
- push @l, 'evdev' if any { $_->{Synaptics} || $_->{ALPS} || $_->{Elantech} || $_->{HWHEEL} } detect_devices::getInputDevices();
+ push @l, 'evdev' if detect_devices::hasTouchpad();
+ push @l, 'evdev' if any { $_->{HWHEEL} } getInputDevices();
push @l, 'hdaps' if $is_laptop && $manufacturer eq 'LENOVO';
append_to_modules_loaded_at_startup("$::prefix/etc/modprobe.preload", @l);
}