diff options
author | Ruslan Ermilov <ru@FreeBSD.org> | 2006-03-23 08:48:38 +0000 |
---|---|---|
committer | Ruslan Ermilov <ru@FreeBSD.org> | 2006-03-23 08:48:38 +0000 |
commit | f557468cb8806aafb2310a545bc52bc53f8e9e01 (patch) | |
tree | dd3a0b56275c4d36f2bb04ab99e2cabb9eb94e0c | |
parent | 177e987e63fd548a835ab92690e5aea3d5b4e4d4 (diff) | |
download | src-f557468cb8806aafb2310a545bc52bc53f8e9e01.tar.gz src-f557468cb8806aafb2310a545bc52bc53f8e9e01.zip |
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.
Notes
Notes:
svn path=/head/; revision=157040
-rw-r--r-- | etc/rc.d/serial | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/etc/rc.d/serial b/etc/rc.d/serial index e586e7352b27..f53f40c65bec 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 |