From f5ae79d660f0fbba0a542eab584added25f92eee Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 19 Dec 2005 13:24:17 +0000 Subject: (getSCSI_26) handle kernel-2.6.14+ --- perl-install/detect_devices.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index fb92a15ba..d143b12c0 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -289,7 +289,8 @@ sub getSCSI_26() { my $usb_dir = readlink("$dir/block/device") =~ m!/usb! && "$dir/block/device/../../../.."; my $get_usb = sub { chomp_(cat_("$usb_dir/$_[0]")) }; - my ($device) = readlink("$dir/block") =~ m!/block/(.*)!; + my $node = -e "$dir/block" ? "$dir/block" : top(glob_("$dir/block*")); + my ($device) = readlink($node) =~ m!/block/(.*)!; my $media_type = ${{ st => 'tape', sr => 'cdrom', sd => 'hd' }}{substr($device, 0, 2)}; # Old hp scanners report themselves as "Processor"s -- cgit v1.2.1