summaryrefslogtreecommitdiffstats
path: root/perl-install/detect_devices.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/detect_devices.pm')
-rw-r--r--perl-install/detect_devices.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index b076187a4..0022d4685 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -121,7 +121,8 @@ sub complete_usb_storage_info {
if (my $e = find { !$_->{found} && $_->{usb_vendor} == $usb->{vendor} && $_->{usb_id} == $usb->{id} } @usb) {
my $host = get_sysfs_usbpath_for_block($e->{device});
if ($host) {
- $e->{info} = chomp_(cat_("/sys/block/$host/../serial"));
+ my $file = "/sys/block/$host/../serial";
+ $e->{info} = chomp_(cat_($file)) if -e $file;
$e->{usb_description} = join('|',
chomp_(cat_("/sys/block/$host/../manufacturer")),
chomp_(cat_("/sys/block/$host/../product")));