summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2006-03-23 08:48:38 +0000
committerru <ru@FreeBSD.org>2006-03-23 08:48:38 +0000
commit4da77db3b26aa1651a02a46a1768726e1ed4bbd6 (patch)
treedd3a0b56275c4d36f2bb04ab99e2cabb9eb94e0c /etc
parentcd8997229b8c05ec524bbbffefe5447305e2b7bc (diff)
downloadFreeBSD-src-4da77db3b26aa1651a02a46a1768726e1ed4bbd6.zip
FreeBSD-src-4da77db3b26aa1651a02a46a1768726e1ed4bbd6.tar.gz
Add an example of how to set up a 3-wire serial terminal.
Usually, getty(8) does the trick, but if you just need a serial console without getty(8), here's how.
Diffstat (limited to 'etc')
-rw-r--r--etc/rc.d/serial19
1 files changed, 17 insertions, 2 deletions
diff --git a/etc/rc.d/serial b/etc/rc.d/serial
index e586e73..f53f40c 100644
--- a/etc/rc.d/serial
+++ b/etc/rc.d/serial
@@ -130,18 +130,33 @@ terminal() {
done
}
+3wire() {
+ # 3-wire serial terminals. These don't supply carrier, so
+ # clocal needs to be set, and crtscts needs to be unset.
+
+ dc=$1; shift
+
+ terminal ${dc} $*
+ for i in $*
+ do
+ stty < /dev/tty${dc}${i}.init clocal -crtscts
+ stty < /dev/cua${dc}${i}.init clocal -crtscts
+ done
+}
+
# Don't use anything from this file unless you have some buggy programs
# that require it.
# Edit the functions and the examples to suit your system.
-# $1 is the call in device identifier, $2 is the call out device identifier
-# and the remainder of the line lists the device numbers.
+# $1 is the device identifier, and the remainder of the line
+# lists the device numbers.
# Initialize assorted 8250-16550 (sio) ports.
# maybe d 0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v
# mouse d 2
# modem d 1
# terminal d 0
+# 3wire d 0
# Initialize all ports on a Cyclades-8yo.
# modem c 00 01 02 03 04 05 06 07
OpenPOWER on IntegriCloud