From 6557b616d1bbb92c3d1011db841d2f9cfac4211e Mon Sep 17 00:00:00 2001 From: ache Date: Sat, 4 Jun 1994 00:44:00 +0000 Subject: Now rc.serial used for initial setup of serial lines --- etc/rc | 8 ++++- etc/rc.d/serial | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ etc/rc.serial | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 189 insertions(+), 1 deletion(-) create mode 100644 etc/rc.d/serial create mode 100644 etc/rc.serial diff --git a/etc/rc b/etc/rc index 2d3b6ee..51c426f 100644 --- a/etc/rc +++ b/etc/rc @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: rc,v 1.23 1994/05/23 11:22:10 ache Exp $ +# $Id: rc,v 1.24 1994/06/01 17:04:01 paul Exp $ # From: @(#)rc 5.27 (Berkeley) 6/5/91 # System startup script run by init on autoboot @@ -69,6 +69,12 @@ rm -f /fastboot # XXX (root now writeable) # the machine runs UTC CMOS clock). See adjkerntz(8) for details. adjkerntz -i +# configure serial devices +if [ -f /etc/rc.serial ] +then + sh /etc/rc.serial +fi + # set hostname, turn on network echo 'starting network' . /etc/netstart diff --git a/etc/rc.d/serial b/etc/rc.d/serial new file mode 100644 index 0000000..7f042e8 --- /dev/null +++ b/etc/rc.d/serial @@ -0,0 +1,91 @@ +# Change some defauls for serial devices. +# Standard defaults are: +# dtrwait 300 +# initial cflag from = cread cs8 hupcl +# initial iflag, lflag and oflag all 0 +# speed 9600 +# special chars from +# nothing locked +# except for serial consoles the initial iflag, lflag and oflag are from +# and clocal is locked on. + +default() { + # Reset everything changed by the other functions to initial defaults. + for i in $* + do + comcontrol /dev/ttyd$i dtrwait 300 + stty = cread cs8 hupcl +# initial iflag, lflag and oflag all 0 +# speed 9600 +# special chars from +# nothing locked +# except for serial consoles the initial iflag, lflag and oflag are from +# and clocal is locked on. + +default() { + # Reset everything changed by the other functions to initial defaults. + for i in $* + do + comcontrol /dev/ttyd$i dtrwait 300 + stty