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.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 634b4fe6c..43d3b785d 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -599,8 +599,12 @@ sub whatPrinterPort() {
}
sub probeSerialDevices {
- #- make sure the device are created before probing.
- foreach (0..3) { devices::make("/dev/ttyS$_") }
+ foreach (0..3) {
+ #- make sure the device are created before probing,
+ devices::make("/dev/ttyS$_");
+ #- and make sure the device is a real terminal (major is 4).
+ int((stat "/dev/ttyS$_")[6]/256) == 4 or $serialprobe{"/dev/ttyS$_"} = undef;
+ }
#- for device already probed, we can safely (assuming device are
#- not moved during install :-)