From f5617761c22073ddd6ccbd3e556bc80955300352 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 5 Oct 2004 08:58:10 +0000 Subject: (getUPS) add proper support for "American Power Conversion|Back-UPS" --- perl-install/detect_devices.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'perl-install') diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 02b5a36f4..c2560006c 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -570,7 +570,8 @@ sub getNet() { sub getUPS() { # MGE serial PnP devices: - my @usb_devices = usb_probe(); + my @usb_devices = map { ($_->{name} = $_->{description}) =~ s/.*\|// } usb_probe(); + (map { $_->{port} = $_->{DEVICE}; $_->{bus} = "Serial"; @@ -583,10 +584,9 @@ sub getUPS() { # USB UPSs; (grep { $_->{description} =~ /American Power Conversion\|Back-UPS/ } @usb_devices), (map { - ($_->{name} = $_->{description}) =~ s/.*\|//; - $_->{port} = "auto"; + $_->{port} = "/dev/hiddev0"; $_->{media_type} = 'UPS'; - $_->{driver} =~ s/^UPS://; + $_->{driver} = 'hidups'; $_; } grep { $_->{driver} =~ /ups$/ } @usb_devices); } -- cgit v1.2.1