summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-08-26 12:52:17 +0000
committerFrancois Pons <fpons@mandriva.com>2002-08-26 12:52:17 +0000
commit3401c296c098633573ae9dfb0a4138f99e0e1cc4 (patch)
tree4c74d204b1ec97908b1edc8faa0781572d0cad48 /perl-install
parent1916066643be8b9e94ef49a51807508e394b1f90 (diff)
downloaddrakx-3401c296c098633573ae9dfb0a4138f99e0e1cc4.tar
drakx-3401c296c098633573ae9dfb0a4138f99e0e1cc4.tar.gz
drakx-3401c296c098633573ae9dfb0a4138f99e0e1cc4.tar.bz2
drakx-3401c296c098633573ae9dfb0a4138f99e0e1cc4.tar.xz
drakx-3401c296c098633573ae9dfb0a4138f99e0e1cc4.zip
avoid using serial_probe on non terminal device (ttyxx or ttySxx).
Diffstat (limited to 'perl-install')
-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 :-)