head	1.27;
access;
symbols
	RELENG_8_4:1.27.0.2
	RELENG_9_1_0_RELEASE:1.26.4.1.4.2
	RELENG_9_1:1.26.4.1.0.4
	RELENG_9_1_BP:1.26.4.1
	RELENG_8_3_0_RELEASE:1.26.2.1.8.1
	RELENG_8_3:1.26.2.1.0.8
	RELENG_8_3_BP:1.26.2.1
	RELENG_9_0_0_RELEASE:1.26.4.1.2.1
	RELENG_9_0:1.26.4.1.0.2
	RELENG_9_0_BP:1.26.4.1
	RELENG_9:1.26.0.4
	RELENG_9_BP:1.26
	RELENG_7_4_0_RELEASE:1.25.12.1
	RELENG_8_2_0_RELEASE:1.26.2.1.6.1
	RELENG_7_4:1.25.0.12
	RELENG_7_4_BP:1.25
	RELENG_8_2:1.26.2.1.0.6
	RELENG_8_2_BP:1.26.2.1
	RELENG_8_1_0_RELEASE:1.26.2.1.4.1
	RELENG_8_1:1.26.2.1.0.4
	RELENG_8_1_BP:1.26.2.1
	RELENG_7_3_0_RELEASE:1.25.10.1
	RELENG_7_3:1.25.0.10
	RELENG_7_3_BP:1.25
	RELENG_8_0_0_RELEASE:1.26.2.1.2.1
	RELENG_8_0:1.26.2.1.0.2
	RELENG_8_0_BP:1.26.2.1
	RELENG_8:1.26.0.2
	RELENG_8_BP:1.26
	RELENG_7_2_0_RELEASE:1.25.8.1
	RELENG_7_2:1.25.0.8
	RELENG_7_2_BP:1.25
	RELENG_7_1_0_RELEASE:1.25.6.1
	RELENG_6_4_0_RELEASE:1.24.2.1.6.1
	RELENG_7_1:1.25.0.6
	RELENG_7_1_BP:1.25
	RELENG_6_4:1.24.2.1.0.6
	RELENG_6_4_BP:1.24.2.1
	RELENG_7_0_0_RELEASE:1.25
	RELENG_6_3_0_RELEASE:1.24.2.1
	RELENG_7_0:1.25.0.4
	RELENG_7_0_BP:1.25
	RELENG_6_3:1.24.2.1.0.4
	RELENG_6_3_BP:1.24.2.1
	RELENG_7:1.25.0.2
	RELENG_7_BP:1.25
	RELENG_6_2_0_RELEASE:1.24.2.1
	RELENG_6_2:1.24.2.1.0.2
	RELENG_6_2_BP:1.24.2.1
	RELENG_5_5_0_RELEASE:1.21.2.1
	RELENG_5_5:1.21.2.1.0.6
	RELENG_5_5_BP:1.21.2.1
	RELENG_6_1_0_RELEASE:1.24
	RELENG_6_1:1.24.0.6
	RELENG_6_1_BP:1.24
	RELENG_6_0_0_RELEASE:1.24
	RELENG_6_0:1.24.0.4
	RELENG_6_0_BP:1.24
	RELENG_6:1.24.0.2
	RELENG_6_BP:1.24
	RELENG_5_4_0_RELEASE:1.21.2.1
	RELENG_5_4:1.21.2.1.0.4
	RELENG_5_4_BP:1.21.2.1
	RELENG_5_3_0_RELEASE:1.21.2.1
	RELENG_5_3:1.21.2.1.0.2
	RELENG_5_3_BP:1.21.2.1
	RELENG_5:1.21.0.2
	RELENG_5_BP:1.21
	RELENG_5_2_1_RELEASE:1.20
	RELENG_5_2_0_RELEASE:1.20
	RELENG_5_2:1.20.0.4
	RELENG_5_2_BP:1.20
	RELENG_5_1_0_RELEASE:1.20
	RELENG_5_1:1.20.0.2
	RELENG_5_1_BP:1.20
	RELENG_5_0_0_RELEASE:1.18
	RELENG_5_0:1.18.0.2
	RELENG_5_0_BP:1.18
	old_RELENG_4_6_1_RELEASE:1.14.2.5
	old_RELENG_4_6_0_RELEASE:1.14.2.5
	old_RELENG_4_6:1.14.2.5.0.2
	old_RELENG_4_6_BP:1.14.2.5
	old_RELENG_4_5_0_RELEASE:1.14.2.3
	old_RELENG_4_5:1.14.2.3.0.6
	old_RELENG_4_5_BP:1.14.2.3
	old_RELENG_4_4_0_RELEASE:1.14.2.3
	old_RELENG_4_4:1.14.2.3.0.4
	old_RELENG_4_4_BP:1.14.2.3
	old_RELENG_4_3_0_RELEASE:1.14.2.3
	old_RELENG_4_3:1.14.2.3.0.2
	old_RELENG_4_3_BP:1.14.2.3
	old_RELENG_4_2_0_RELEASE:1.14.2.1
	old_RELENG_4_1_1_RELEASE:1.14
	old_PRE_SMPNG:1.14
	old_RELENG_4_1_0_RELEASE:1.14
	old_RELENG_3_5_0_RELEASE:1.11.2.1
	old_RELENG_4_0_0_RELEASE:1.14
	old_RELENG_4:1.14.0.2
	old_RELENG_4_BP:1.14
	old_RELENG_3_4_0_RELEASE:1.11.2.1
	old_RELENG_3_3_0_RELEASE:1.11.2.1
	old_RELENG_3_2_PAO:1.11.0.4
	old_RELENG_3_2_PAO_BP:1.11
	old_RELENG_3_2_0_RELEASE:1.11
	old_RELENG_3_1_0_RELEASE:1.11
	old_RELENG_3:1.11.0.2
	old_RELENG_3_BP:1.11
	old_RELENG_2_2_8_RELEASE:1.6.2.3
	old_RELENG_3_0_0_RELEASE:1.11
	old_RELENG_2_2_7_RELEASE:1.6.2.3
	old_RELENG_2_2_6_RELEASE:1.6.2.3
	old_RELENG_2_2_5_RELEASE:1.6
	old_RELENG_2_2_2_RELEASE:1.6
	old_RELENG_2_2_1_RELEASE:1.6
	old_RELENG_2_2_0_RELEASE:1.6
	old_RELENG_2_1_7_RELEASE:1.4.4.3
	old_RELENG_2_1_6_1_RELEASE:1.4.4.3
	old_RELENG_2_1_6_RELEASE:1.4.4.3
	old_RELENG_2_2:1.6.0.2
	old_RELENG_2_2_BP:1.6
	old_RELENG_2_1_5_RELEASE:1.4.4.3
	old_RELENG_2_1_0_RELEASE:1.4
	old_RELENG_2_1_0:1.4.0.4
	old_RELENG_2_1_0_BP:1.4
	old_RELENG_2_0_5_RELEASE:1.4
	old_RELENG_2_0_5:1.4.0.2
	old_RELENG_2_0_5_BP:1.4
	old_RELENG_2_0_5_ALPHA:1.4
	old_RELEASE_2_0:1.1
	old_BETA_2_0:1.1
	old_ALPHA_2_0:1.1.0.2
	old_MOVED_NEWCVS:1.1
	old_FINAL_1_1_5:1.1
	old_ALPHA_1_1_5:1.1;
locks; strict;
comment	@# @;


1.27
date	2012.11.17.01.49.05;	author svnexp;	state Exp;
branches
	1.27.2.1;
next	1.26;

1.26
date	2008.07.19.20.12.02;	author marcel;	state Exp;
branches
	1.26.2.1
	1.26.4.1;
next	1.25;

1.25
date	2006.03.23.08.48.38;	author ru;	state Exp;
branches
	1.25.2.1
	1.25.6.1
	1.25.8.1
	1.25.10.1
	1.25.12.1;
next	1.24;

1.24
date	2004.11.14.19.51.34;	author obrien;	state Exp;
branches
	1.24.2.1;
next	1.23;

1.23
date	2004.11.14.19.42.13;	author obrien;	state Exp;
branches;
next	1.22;

1.22
date	2004.10.07.13.55.26;	author mtm;	state Exp;
branches;
next	1.21;

1.21
date	2004.03.08.12.25.05;	author pjd;	state Exp;
branches
	1.21.2.1;
next	1.20;

1.20
date	2003.05.05.03.26.50;	author bde;	state Exp;
branches;
next	1.19;

1.19
date	2003.05.04.22.46.33;	author bde;	state Exp;
branches;
next	1.18;

1.18
date	2002.10.12.10.31.31;	author schweikh;	state Exp;
branches;
next	1.17;

1.17
date	2002.06.13.22.14.36;	author gordon;	state Exp;
branches;
next	1.16;

1.16
date	2002.04.23.08.26.50;	author sobomax;	state Exp;
branches;
next	1.15;

1.15
date	2000.10.08.19.18.24;	author obrien;	state Exp;
branches;
next	1.14;

1.14
date	99.08.27.23.23.44;	author peter;	state Exp;
branches
	1.14.2.1;
next	1.13;

1.13
date	99.08.27.10.59.40;	author sheldonh;	state Exp;
branches;
next	1.12;

1.12
date	99.08.25.16.01.37;	author sheldonh;	state Exp;
branches;
next	1.11;

1.11
date	98.03.13.22.03.03;	author danny;	state Exp;
branches
	1.11.2.1;
next	1.10;

1.10
date	98.03.13.13.33.09;	author danny;	state Exp;
branches;
next	1.9;

1.9
date	97.03.10.14.17.49;	author bde;	state Exp;
branches;
next	1.8;

1.8
date	97.02.23.09.20.51;	author peter;	state Exp;
branches;
next	1.7;

1.7
date	97.01.14.05.44.35;	author jkh;	state Exp;
branches;
next	1.6;

1.6
date	96.02.24.19.51.25;	author bde;	state Exp;
branches
	1.6.2.1;
next	1.5;

1.5
date	96.01.31.15.02.30;	author mpp;	state Exp;
branches;
next	1.4;

1.4
date	95.04.09.09.54.43;	author rgrimes;	state Exp;
branches
	1.4.4.1;
next	1.3;

1.3
date	95.01.05.00.11.52;	author ache;	state Exp;
branches;
next	1.2;

1.2
date	94.12.04.23.54.39;	author ache;	state Exp;
branches;
next	1.1;

1.1
date	94.06.04.00.44.00;	author ache;	state Exp;
branches;
next	;

1.27.2.1
date	2012.11.17.01.49.05;	author svnexp;	state dead;
branches;
next	1.27.2.2;

1.27.2.2
date	2013.03.28.13.02.44;	author svnexp;	state Exp;
branches;
next	;

1.26.2.1
date	2009.08.03.08.13.06;	author kensmith;	state Exp;
branches
	1.26.2.1.2.1
	1.26.2.1.4.1
	1.26.2.1.6.1
	1.26.2.1.8.1;
next	1.26.2.2;

1.26.2.2
date	2012.11.17.10.35.57;	author svnexp;	state Exp;
branches;
next	;

1.26.2.1.2.1
date	2009.10.25.01.10.29;	author kensmith;	state Exp;
branches;
next	;

1.26.2.1.4.1
date	2010.06.14.02.09.06;	author kensmith;	state Exp;
branches;
next	;

1.26.2.1.6.1
date	2010.12.21.17.09.25;	author kensmith;	state Exp;
branches;
next	;

1.26.2.1.8.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.26.2.1.8.2;

1.26.2.1.8.2
date	2012.11.17.08.24.38;	author svnexp;	state Exp;
branches;
next	;

1.26.4.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.26.4.1.2.1
	1.26.4.1.4.1;
next	1.26.4.2;

1.26.4.2
date	2012.11.17.11.36.11;	author svnexp;	state Exp;
branches;
next	;

1.26.4.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.26.4.1.2.2;

1.26.4.1.2.2
date	2012.11.17.08.36.11;	author svnexp;	state Exp;
branches;
next	;

1.26.4.1.4.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.26.4.1.4.2;

1.26.4.1.4.2
date	2012.11.17.08.47.01;	author svnexp;	state Exp;
branches;
next	;

1.25.2.1
date	2012.11.17.08.01.23;	author svnexp;	state Exp;
branches;
next	;

1.25.6.1
date	2008.11.25.02.59.29;	author kensmith;	state Exp;
branches;
next	;

1.25.8.1
date	2009.04.15.03.14.26;	author kensmith;	state Exp;
branches;
next	;

1.25.10.1
date	2010.02.10.00.26.20;	author kensmith;	state Exp;
branches;
next	;

1.25.12.1
date	2010.12.21.17.10.29;	author kensmith;	state Exp;
branches;
next	1.25.12.2;

1.25.12.2
date	2012.11.17.08.16.37;	author svnexp;	state Exp;
branches;
next	;

1.24.2.1
date	2006.08.29.16.31.11;	author ru;	state Exp;
branches
	1.24.2.1.6.1;
next	1.24.2.2;

1.24.2.2
date	2012.11.17.07.39.09;	author svnexp;	state Exp;
branches;
next	;

1.24.2.1.6.1
date	2008.10.02.02.57.24;	author kensmith;	state Exp;
branches;
next	;

1.21.2.1
date	2004.10.10.09.50.54;	author mtm;	state Exp;
branches;
next	;

1.14.2.1
date	2000.10.30.10.40.11;	author obrien;	state Exp;
branches;
next	1.14.2.2;

1.14.2.2
date	2001.03.06.01.58.45;	author obrien;	state Exp;
branches;
next	1.14.2.3;

1.14.2.3
date	2001.03.06.02.22.00;	author obrien;	state Exp;
branches;
next	1.14.2.4;

1.14.2.4
date	2002.05.07.07.35.30;	author sobomax;	state Exp;
branches;
next	1.14.2.5;

1.14.2.5
date	2002.05.07.07.47.17;	author sobomax;	state Exp;
branches;
next	;

1.11.2.1
date	99.08.29.14.18.58;	author peter;	state Exp;
branches;
next	;

1.6.2.1
date	98.02.15.14.24.51;	author jkh;	state Exp;
branches;
next	1.6.2.2;

1.6.2.2
date	98.03.13.14.01.57;	author danny;	state Exp;
branches;
next	1.6.2.3;

1.6.2.3
date	98.03.13.22.01.26;	author danny;	state Exp;
branches;
next	1.6.2.4;

1.6.2.4
date	99.09.05.11.01.58;	author peter;	state Exp;
branches;
next	;

1.4.4.1
date	96.05.29.22.23.39;	author jkh;	state Exp;
branches;
next	1.4.4.2;

1.4.4.2
date	96.06.05.02.36.36;	author jkh;	state Exp;
branches;
next	1.4.4.3;

1.4.4.3
date	96.07.02.14.39.34;	author bde;	state Exp;
branches;
next	1.4.4.4;

1.4.4.4
date	99.09.05.11.02.52;	author peter;	state Exp;
branches;
next	;


desc
@@


1.27
log
@Switching exporter and resync
@
text
@#!/bin/sh
#
# Copyright (c) 1996  Andrey A. Chernov
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# $FreeBSD: head/etc/rc.d/serial 180619 2008-07-19 20:12:02Z marcel $
#

# PROVIDE: serial
# REQUIRE: root
# KEYWORD: nojail

# Change some defaults for serial devices.
# Standard defaults are:
#	dtrwait 300 drainwait `sysctl -n kern.drainwait`
#	initial cflag from <sys/ttydefaults.h> = cread cs8 hupcl
#	initial iflag, lflag and oflag all 0
#	speed 9600
#	special chars from <sys/ttydefaults.h>
#	nothing locked
# except for serial consoles the initial iflag, lflag and oflag are from
# <sys/ttydefaults.h> and clocal is locked on.

default() {
	# Reset everything changed by the other functions to initial defaults.

	dc=$1; shift	# device name character
	drainwait=`sysctl -n kern.drainwait`

	for i in $*
	do
		comcontrol /dev/tty${dc}${i} dtrwait 300 drainwait $drainwait
		stty < /dev/tty${dc}${i}.init -clocal crtscts hupcl 9600 reprint ^R
		stty < /dev/tty${dc}${i}.lock -clocal -crtscts -hupcl 0
		stty < /dev/cua${dc}${i}.init -clocal crtscts hupcl 9600 reprint ^R
		stty < /dev/cua${dc}${i}.lock -clocal -crtscts -hupcl 0
	done
}

maybe() {
	# Special settings.

	dc=$1; shift

	for i in $*
	do
		# Don't use ^R; it breaks bash's ^R when typed ahead.
		stty < /dev/tty${dc}${i}.init reprint undef
		stty < /dev/cua${dc}${i}.init reprint undef
		# Lock clocal off on dialin device for security.
		stty < /dev/tty${dc}${i}.lock clocal
		# Lock the speeds to use old binaries that don't support them.
		# Any legal speed works to lock the initial speed.
		stty < /dev/tty${dc}${i}.lock 300
		stty < /dev/cua${dc}${i}.lock 300
	done
}

modem() {
	# Modem that supports CTS and perhaps RTS handshaking.

	dc=$1; shift

	for i in $*
	do
		# may depend on modem
		comcontrol /dev/tty${dc}${i} dtrwait 100 drainwait 180
		# Lock crtscts on.
		# Speed reasonable for V42bis.
		stty < /dev/tty${dc}${i}.init crtscts 115200
		stty < /dev/tty${dc}${i}.lock crtscts
		stty < /dev/cua${dc}${i}.init crtscts 115200
		stty < /dev/cua${dc}${i}.lock crtscts
	done
}

mouse() {
	# Mouse on either callin or callout port.

	dc=$1; shift

	for i in $*
	do
		# Lock clocal on, hupcl off.
		# Standard speed for Microsoft mouse.
		stty < /dev/tty${dc}${i}.init clocal -hupcl 1200
		stty < /dev/tty${dc}${i}.lock clocal  hupcl
		stty < /dev/cua${dc}${i}.init clocal -hupcl 1200
		stty < /dev/cua${dc}${i}.lock clocal  hupcl
	done
}

terminal() {
	# Terminal that supports CTS and perhaps RTS handshaking
	# with the cable or terminal arranged so that DCD is on
	# at least while the terminal is on.
	# Also works for bidirectional communications to another pc
	# provided at most one side runs getty.
	# Same as modem() except we want a faster speed and no dtrwait.

	dc=$1; shift

	modem ${dc} $*
	for i in $*
	do
		comcontrol /dev/tty${dc}${i} dtrwait 0
		stty < /dev/tty${dc}${i}.init 115200
		stty < /dev/cua${dc}${i}.init 115200
	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 device identifier, and the remainder of the line
# lists the device numbers.

# Initialize assorted 8250-16550 (uart) ports.
# maybe    u  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    u      2
# modem    u    1
# terminal u  0
# 3wire    u  0

# Initialize all ports on a Cyclades-8yo.
# modem    c  00 01 02 03 04 05 06 07

# Initialize all ports on a Cyclades-16ye.
# modem    c  00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f

# Initialize all ports on a Digiboard 8.
# modem    D  00 01 02 03 04 05 06 07
@


1.27.2.1
log
@file serial was added on branch RELENG_8_4 on 2013-03-28 13:02:44 +0000
@
text
@d1 168
@


1.27.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 168
#!/bin/sh
#
# Copyright (c) 1996  Andrey A. Chernov
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# $FreeBSD: releng/8.4/etc/rc.d/serial 180619 2008-07-19 20:12:02Z marcel $
#

# PROVIDE: serial
# REQUIRE: root
# KEYWORD: nojail

# Change some defaults for serial devices.
# Standard defaults are:
#	dtrwait 300 drainwait `sysctl -n kern.drainwait`
#	initial cflag from <sys/ttydefaults.h> = cread cs8 hupcl
#	initial iflag, lflag and oflag all 0
#	speed 9600
#	special chars from <sys/ttydefaults.h>
#	nothing locked
# except for serial consoles the initial iflag, lflag and oflag are from
# <sys/ttydefaults.h> and clocal is locked on.

default() {
	# Reset everything changed by the other functions to initial defaults.

	dc=$1; shift	# device name character
	drainwait=`sysctl -n kern.drainwait`

	for i in $*
	do
		comcontrol /dev/tty${dc}${i} dtrwait 300 drainwait $drainwait
		stty < /dev/tty${dc}${i}.init -clocal crtscts hupcl 9600 reprint ^R
		stty < /dev/tty${dc}${i}.lock -clocal -crtscts -hupcl 0
		stty < /dev/cua${dc}${i}.init -clocal crtscts hupcl 9600 reprint ^R
		stty < /dev/cua${dc}${i}.lock -clocal -crtscts -hupcl 0
	done
}

maybe() {
	# Special settings.

	dc=$1; shift

	for i in $*
	do
		# Don't use ^R; it breaks bash's ^R when typed ahead.
		stty < /dev/tty${dc}${i}.init reprint undef
		stty < /dev/cua${dc}${i}.init reprint undef
		# Lock clocal off on dialin device for security.
		stty < /dev/tty${dc}${i}.lock clocal
		# Lock the speeds to use old binaries that don't support them.
		# Any legal speed works to lock the initial speed.
		stty < /dev/tty${dc}${i}.lock 300
		stty < /dev/cua${dc}${i}.lock 300
	done
}

modem() {
	# Modem that supports CTS and perhaps RTS handshaking.

	dc=$1; shift

	for i in $*
	do
		# may depend on modem
		comcontrol /dev/tty${dc}${i} dtrwait 100 drainwait 180
		# Lock crtscts on.
		# Speed reasonable for V42bis.
		stty < /dev/tty${dc}${i}.init crtscts 115200
		stty < /dev/tty${dc}${i}.lock crtscts
		stty < /dev/cua${dc}${i}.init crtscts 115200
		stty < /dev/cua${dc}${i}.lock crtscts
	done
}

mouse() {
	# Mouse on either callin or callout port.

	dc=$1; shift

	for i in $*
	do
		# Lock clocal on, hupcl off.
		# Standard speed for Microsoft mouse.
		stty < /dev/tty${dc}${i}.init clocal -hupcl 1200
		stty < /dev/tty${dc}${i}.lock clocal  hupcl
		stty < /dev/cua${dc}${i}.init clocal -hupcl 1200
		stty < /dev/cua${dc}${i}.lock clocal  hupcl
	done
}

terminal() {
	# Terminal that supports CTS and perhaps RTS handshaking
	# with the cable or terminal arranged so that DCD is on
	# at least while the terminal is on.
	# Also works for bidirectional communications to another pc
	# provided at most one side runs getty.
	# Same as modem() except we want a faster speed and no dtrwait.

	dc=$1; shift

	modem ${dc} $*
	for i in $*
	do
		comcontrol /dev/tty${dc}${i} dtrwait 0
		stty < /dev/tty${dc}${i}.init 115200
		stty < /dev/cua${dc}${i}.init 115200
	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 device identifier, and the remainder of the line
# lists the device numbers.

# Initialize assorted 8250-16550 (uart) ports.
# maybe    u  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    u      2
# modem    u    1
# terminal u  0
# 3wire    u  0

# Initialize all ports on a Cyclades-8yo.
# modem    c  00 01 02 03 04 05 06 07

# Initialize all ports on a Cyclades-16ye.
# modem    c  00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f

# Initialize all ports on a Digiboard 8.
# modem    D  00 01 02 03 04 05 06 07
@


1.26
log
@SVN rev 180619 on 2008-07-19 20:12:02Z by marcel

With uart(4) default, change /dev/cuad# to /dev/cuau# and
sio# to uart# so that out-of-the-box FreeBSD is consistent.
@
text
@d27 1
a27 1
# $FreeBSD$
@


1.26.4.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.26.4.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d27 1
a27 1
# $FreeBSD: stable/9/etc/rc.d/serial 180619 2008-07-19 20:12:02Z marcel $
@


1.26.4.1.4.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.26.4.1.4.2
log
@Switch importer
@
text
@d27 1
a27 1
# $FreeBSD: releng/9.1/etc/rc.d/serial 180619 2008-07-19 20:12:02Z marcel $
@


1.26.4.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.26.4.1.2.2
log
@Switch importer
@
text
@d27 1
a27 1
# $FreeBSD: releng/9.0/etc/rc.d/serial 180619 2008-07-19 20:12:02Z marcel $
@


1.26.2.1
log
@SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)
@
text
@@


1.26.2.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not).  Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ##       [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ##       [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by:	yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d27 1
a27 1
# $FreeBSD: stable/8/etc/rc.d/serial 180619 2008-07-19 20:12:02Z marcel $
@


1.26.2.1.8.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith

Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.26.2.1.8.2
log
@Switch importer
@
text
@d27 1
a27 1
# $FreeBSD: releng/8.3/etc/rc.d/serial 180619 2008-07-19 20:12:02Z marcel $
@


1.26.2.1.6.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)
@
text
@@


1.26.2.1.4.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)
@
text
@@


1.26.2.1.2.1
log
@SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)
@
text
@@


1.25
log
@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.
@
text
@d154 6
a159 6
# 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
@


1.25.2.1
log
@Switch importer
@
text
@d27 1
a27 1
# $FreeBSD: stable/7/etc/rc.d/serial 220110 2011-03-28 19:29:30Z dougb $
@


1.25.12.1
log
@SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)
@
text
@@


1.25.12.2
log
@Switch importer
@
text
@d27 1
a27 1
# $FreeBSD: releng/7.4/etc/rc.d/serial 157040 2006-03-23 08:48:38Z ru $
@


1.25.10.1
log
@SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)
@
text
@@


1.25.8.1
log
@SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)
@
text
@@


1.25.6.1
log
@SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)
@
text
@@


1.24
log
@Unify the ci/co variables now that the the tty drivers now use the same
character for both.
@
text
@d133 14
d151 2
a152 2
# $1 is the call in device identifier, $2 is the call out device identifier
# and the remainder of the line lists the device numbers.
d159 1
@


1.24.2.1
log
@MFC: 1.25: Add an example of how to set up a 3-wire serial terminal.
@
text
@a132 14
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
}

d137 2
a138 2
# $1 is the device identifier, and the remainder of the line
# lists the device numbers.
a144 1
# 3wire    d  0
@


1.24.2.2
log
@Switch importer
@
text
@d27 1
a27 1
# $FreeBSD: stable/6/etc/rc.d/serial 161712 2006-08-29 16:31:11Z ru $
@


1.24.2.1.6.1
log
@SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith

Create releng/6.4 from stable/6 in preparation for 6.4-RC1.

Approved by:	re (implicit)
@
text
@@


1.23
log
@Catch up with PHK's sio(4) rework [sys/dev/sio/sio.c rev. 1.456].
@
text
@d48 1
a48 2
	ci=$1; shift	# call in device identifier
	co=$1; shift	# call out device identifier
d53 5
a57 5
		comcontrol /dev/tty${ci}${i} dtrwait 300 drainwait $drainwait
		stty < /dev/tty${ci}${i}.init -clocal crtscts hupcl 9600 reprint ^R
		stty < /dev/tty${ci}${i}.lock -clocal -crtscts -hupcl 0
		stty < /dev/cua${co}${i}.init -clocal crtscts hupcl 9600 reprint ^R
		stty < /dev/cua${co}${i}.lock -clocal -crtscts -hupcl 0
d64 1
a64 2
	ci=$1; shift
	co=$1; shift
d69 2
a70 2
		stty < /dev/tty${ci}${i}.init reprint undef
		stty < /dev/cua${co}${i}.init reprint undef
d72 1
a72 1
		stty < /dev/tty${ci}${i}.lock clocal
d75 2
a76 2
		stty < /dev/tty${ci}${i}.lock 300
		stty < /dev/cua${co}${i}.lock 300
d83 1
a83 2
	ci=$1; shift
	co=$1; shift
d88 1
a88 1
		comcontrol /dev/tty${ci}${i} dtrwait 100 drainwait 180
d91 4
a94 4
		stty < /dev/tty${ci}${i}.init crtscts 115200
		stty < /dev/tty${ci}${i}.lock crtscts
		stty < /dev/cua${co}${i}.init crtscts 115200
		stty < /dev/cua${co}${i}.lock crtscts
d101 1
a101 2
	ci=$1; shift
	co=$1; shift
d107 4
a110 4
		stty < /dev/tty${ci}${i}.init clocal -hupcl 1200
		stty < /dev/tty${ci}${i}.lock clocal  hupcl
		stty < /dev/cua${co}${i}.init clocal -hupcl 1200
		stty < /dev/cua${co}${i}.lock clocal  hupcl
d122 1
a122 2
	ci=$1; shift
	co=$1; shift
d124 1
a124 1
	modem ${ci} ${co} $*
d127 3
a129 3
		comcontrol /dev/tty${ci}${i} dtrwait 0
		stty < /dev/tty${ci}${i}.init 115200
		stty < /dev/cua${co}${i}.init 115200
d141 4
a144 4
# maybe    d 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 d      2
# modem    d d    1
# terminal d d  0
d147 1
a147 1
# modem    c c  00 01 02 03 04 05 06 07
d150 1
a150 1
# modem    c c  00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f
d153 1
a153 1
# modem    D D  00 01 02 03 04 05 06 07
@


1.22
log
@Remove the requirement for the FreeBSD keyword as it no longer
makes any sense.

Discussed with: dougb, brooks
MFC after: 3 days
@
text
@d55 4
a58 4
		stty < /dev/ttyi${ci}${i} -clocal crtscts hupcl 9600 reprint ^R
		stty < /dev/ttyl${ci}${i} -clocal -crtscts -hupcl 0
		stty < /dev/cuai${co}${i} -clocal crtscts hupcl 9600 reprint ^R
		stty < /dev/cual${co}${i} -clocal -crtscts -hupcl 0
d71 2
a72 2
		stty < /dev/ttyi${ci}${i} reprint undef
		stty < /dev/cuai${co}${i} reprint undef
d74 1
a74 1
		stty < /dev/ttyl${ci}${i} clocal
d77 2
a78 2
		stty < /dev/ttyl${ci}${i} 300
		stty < /dev/cual${co}${i} 300
d94 4
a97 4
		stty < /dev/ttyi${ci}${i} crtscts 115200
		stty < /dev/ttyl${ci}${i} crtscts
		stty < /dev/cuai${co}${i} crtscts 115200
		stty < /dev/cual${co}${i} crtscts
d111 4
a114 4
		stty < /dev/ttyi${ci}${i} clocal -hupcl 1200
		stty < /dev/ttyl${ci}${i} clocal  hupcl
		stty < /dev/cuai${co}${i} clocal -hupcl 1200
		stty < /dev/cual${co}${i} clocal  hupcl
d133 2
a134 2
		stty < /dev/ttyi${ci}${i} 115200
		stty < /dev/cuai${co}${i} 115200
d146 4
a149 4
# maybe    d a  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 a      2
# modem    d a    1
# terminal d a  0
@


1.21
log
@Mark scripts as not usable inside a jail by adding keyword 'nojail'.

Some suggestions from:	rwatson, Ruben de Groot <mail25@@bzerk.org>
@
text
@d32 1
a32 1
# KEYWORD: FreeBSD nojail
@


1.21.2.1
log
@RCS file: /home/ncvs/src/etc/rc,v
----------------------------
revision 1.335
date: 2004/10/08 14:23:49;  author: mtm;  state: Exp;  lines: +0 -1
Remove an unused variable.

Submitted by: Pawel Worach <pawel.worach@@telia.com>
----------------------------
revision 1.334
date: 2004/10/07 13:55:25;  author: mtm;  state: Exp;  lines: +1 -1
Remove the requirement for the FreeBSD keyword as it no longer
makes any sense.

Discussed with: dougb, brooks
MFC after: 3 days
=============================================================================
RCS file: /home/ncvs/src/etc/rc.d/nsswitch,v
----------------------------
revision 1.4
date: 2004/09/16 17:03:12;  author: keramida;  state: Exp;  lines: +1 -1
Fix requirement of `network' to `NETWORK' because the former isn't
provided by any rc.d script.

Approved by:	mtm
=============================================================================
RCS file: /home/ncvs/src/etc/rc.d/pflog,v
----------------------------
revision 1.3
date: 2004/09/16 17:04:20;  author: keramida;  state: Exp;  lines: +1 -1
We don't have any providers of `beforenetlkm' in FreeBSD.  Remove the
dependency to it from our rc.d scripts.

Approved by:	mtm
=============================================================================

Approved by: re/scottl
@
text
@d32 1
a32 1
# KEYWORD: nojail
@


1.20
log
@Catch up with 1995(?) for modem speeds (use 57600 instead of 115200 for
the example host to modem speed).
@
text
@d32 1
a32 1
# KEYWORD: FreeBSD
@


1.19
log
@When resetting to defaults, reset drainwait to the current default pf
`sysctl -n kern.drainwait` instead of to the boot-time default of 300.
@
text
@d94 1
a94 1
		stty < /dev/ttyi${ci}${i} crtscts 57600
d96 1
a96 1
		stty < /dev/cuai${co}${i} crtscts 57600
@


1.18
log
@Fix style bugs:
* Space -> tabs conversion.
* Removed blanks before semicolon in "if ... ; then".
* Proper indentation of misindented lines.
* Put a full stop after some comments.
* Removed whitespace at end of line.

Approved by:	silence from gordon
@
text
@d36 1
a36 1
#	dtrwait 300 drainwait 0
d50 1
d54 1
a54 1
		comcontrol /dev/tty${ci}${i} dtrwait 300 drainwait 300
@


1.17
log
@Merge in all the changes that Mike Makonnen has been maintaining for a
while. This is only the script pieces, the glue for the build comes next.

Submitted by:   Mike Makonnen <makonnen@@pacbell.net>
Reviewed by:    silence on -current and -hackers
Prodded by:     rwatson
@
text
@d154 1
a154 1
# modem    c c  00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 
@


1.16
log
@Correct default value of drainwait: it should be 300 seconds, not forever.

PR:		37370
Submitted by:	Daniel O'Connor <doconnor@@gsoft.com.au>
MFC after:	2 weeks
@
text
@d30 4
@


1.15
log
@Add copyright notices.  Other systems have been barrowing our /etc files
w/o giving any credit.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc.serial,v 1.14 1999/08/27 23:23:44 peter Exp $
d49 1
a49 1
		comcontrol /dev/tty${ci}${i} dtrwait 300 drainwait 0
@


1.14
log
@$Id$ -> $FreeBSD$
@
text
@d2 27
a28 1
# $FreeBSD$
@


1.14.2.1
log
@MFC: Add copyright.
@
text
@a1 25
#
# Copyright (c) 1996  Andrey A. Chernov
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
a2 1
#
@


1.14.2.2
log
@MFC: add copyright notices
@
text
@d27 1
a27 27
#
#
# Copyright (c) 1996  Andrey A. Chernov
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# $FreeBSD: src/etc/rc.serial,v 1.14.2.1 2000/10/30 10:40:11 obrien Exp $
@


1.14.2.3
log
@I really did a number on adding the copyrights...
@
text
@d27 27
a53 1
# $FreeBSD: src/etc/rc.serial,v 1.14.2.2 2001/03/06 01:58:45 obrien Exp $
@


1.14.2.4
log
@MFC: correct default value of drainwait.
@
text
@d27 1
a27 1
# $FreeBSD$
d49 1
a49 1
		comcontrol /dev/tty${ci}${i} dtrwait 300 drainwait 300
@


1.14.2.5
log
@Revert 1.14.2.4 - I forgot that we are frozen. Sorry.
@
text
@d27 1
a27 1
# $FreeBSD: src/etc/rc.serial,v 1.14.2.4 2002/05/07 07:35:30 sobomax Exp $
d49 1
a49 1
		comcontrol /dev/tty${ci}${i} dtrwait 300 drainwait 0
@


1.13
log
@Small whitespace change to fix run-over lines introduced in the previous
commit.

Reported by:	bde
@
text
@d2 1
a2 1
# $Id: rc.serial,v 1.12 1999/08/25 16:01:37 sheldonh Exp $
@


1.12
log
@Style clean-up:

	* All variables are now embraced: ${foo}

	* All comparisons against some value now take the form:
	  [ "${foo}" ? "value" ]
	  where ? is a comparison operator

	* All empty string tests now take the form:
	  [ -z "${foo}" ]

	* All non-empty string tests now take the form:
	  [ -n "${foo}" ]

Submitted by:	jkh
@
text
@d2 1
a2 1
# $Id: rc.serial,v 1.11 1998/03/13 22:03:03 danny Exp $
d24 1
a24 1
		stty < /dev/ttyi${ci}${i} -clocal  crtscts  hupcl 9600 reprint ^R
d26 1
a26 1
		stty < /dev/cuai${co}${i} -clocal  crtscts  hupcl 9600 reprint ^R
@


1.11
log
@Submitted by:	 bde
Back out last brain blip.
@
text
@d2 1
a2 1
# $Id: rc.serial,v 1.10 1998/03/13 13:33:09 danny Exp $
d23 5
a27 5
		comcontrol /dev/tty$ci$i dtrwait 300 drainwait 0
		stty </dev/ttyi$ci$i -clocal  crtscts  hupcl 9600 reprint ^R
		stty </dev/ttyl$ci$i -clocal -crtscts -hupcl 0
		stty </dev/cuai$co$i -clocal  crtscts  hupcl 9600 reprint ^R
		stty </dev/cual$co$i -clocal -crtscts -hupcl 0
d40 2
a41 2
		stty </dev/ttyi$ci$i reprint undef
		stty </dev/cuai$co$i reprint undef
d43 1
a43 1
		stty </dev/ttyl$ci$i clocal
d46 2
a47 2
		stty </dev/ttyl$ci$i 300
		stty </dev/cual$co$i 300
d60 1
a60 1
		comcontrol /dev/tty$ci$i dtrwait 100 drainwait 180
d63 4
a66 4
		stty </dev/ttyi$ci$i crtscts 57600
		stty </dev/ttyl$ci$i crtscts
		stty </dev/cuai$co$i crtscts 57600
		stty </dev/cual$co$i crtscts
d80 4
a83 4
		stty </dev/ttyi$ci$i clocal -hupcl 1200
		stty </dev/ttyl$ci$i clocal  hupcl
		stty </dev/cuai$co$i clocal -hupcl 1200
		stty </dev/cual$co$i clocal  hupcl
d98 1
a98 1
	modem $ci $co $*
d101 3
a103 3
		comcontrol /dev/tty$ci$i dtrwait 0
		stty </dev/ttyi$ci$i 115200
		stty </dev/cuai$co$i 115200
@


1.11.2.1
log
@$Id$ -> $FreeBSD$
@
text
@d2 1
a2 1
# $FreeBSD$
@


1.10
log
@Change examples for Cyclades cards (c -> c0) to fit with reality.
@
text
@d2 1
a2 1
# $Id: rc.serial,v 1.9 1997/03/10 14:17:49 bde Exp $
d121 1
a121 1
# modem    c0 c0  00 01 02 03 04 05 06 07
d124 1
a124 1
# modem    c0 c0  00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 
@


1.9
log
@Fixed the Cyclades and Digiboard port numbers.
@
text
@d2 1
a2 1
# $Id: rc.serial,v 1.8 1997/02/23 09:20:51 peter Exp $
d121 1
a121 1
# modem    c c  00 01 02 03 04 05 06 07
d124 1
a124 1
# modem    c c  00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 
@


1.8
log
@Revert $FreeBSD$ to $Id$
@
text
@d2 1
a2 1
# $Id$
d121 1
a121 1
# modem    c c  0 1 2 3 4 5 6 7
d124 1
a124 1
# modem    c c  0 1 2 3 4 5 6 7 8 9 a b c d e f 
d127 1
a127 1
# modem    D D  0 1 2 3 4 5 6 7
@


1.7
log
@Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
@
text
@d2 1
a2 1
# $FreeBSD$
@


1.6
log
@Added support for Cyclades and Digiboard devices.

Submitted by:	Daniel O'Callaghan <danny@@lynx.its.unimelb.edu.au>
                + mods by bde
@
text
@d2 1
a2 1
# $Id$
@


1.6.2.1
log
@MFC: selected improvements for etc files *not* including periodic changes,
     security tweaks or other kerberbos related stuff.  I expect that
     stuff to occur as a side-effect of what others will be doing in etc,
     if at all.
@
text
@d2 1
a2 1
# $Id: rc.serial,v 1.6 1996/02/24 19:51:25 bde Exp $
d121 1
a121 1
# modem    c c  00 01 02 03 04 05 06 07
d124 1
a124 1
# modem    c c  00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 
d127 1
a127 1
# modem    D D  00 01 02 03 04 05 06 07
@


1.6.2.2
log
@Reviewed by:	jkh
MFC - Cyclades examples c -> c0
@
text
@d2 1
a2 1
# $Id: rc.serial,v 1.6.2.1 1998/02/15 14:24:51 jkh Exp $
d121 1
a121 1
# modem    c0 c0  00 01 02 03 04 05 06 07
d124 1
a124 1
# modem    c0 c0  00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 
@


1.6.2.3
log
@Obtained from: bde
Back out last brain blip
@
text
@d2 1
a2 1
# $Id: rc.serial,v 1.6.2.2 1998/03/13 14:01:57 danny Exp $
d121 1
a121 1
# modem    c c  00 01 02 03 04 05 06 07
d124 1
a124 1
# modem    c c  00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 
@


1.6.2.4
log
@$Id$ -> $FreeBSD$
@
text
@d2 1
a2 1
# $FreeBSD$
@


1.5
log
@Another round of spelling fixes.
@
text
@d1 3
d17 4
d23 5
a27 5
		comcontrol /dev/ttyd$i dtrwait 300 drainwait 0
		stty </dev/ttyid$i -clocal  crtscts  hupcl 9600 reprint ^R
		stty </dev/ttyld$i -clocal -crtscts -hupcl 0
		stty </dev/cuaia$i -clocal  crtscts  hupcl 9600 reprint ^R
		stty </dev/cuala$i -clocal -crtscts -hupcl 0
d33 4
d40 2
a41 2
		stty </dev/ttyid$i reprint undef
		stty </dev/cuaia$i reprint undef
d43 1
a43 1
		stty </dev/ttyld$i clocal
d46 2
a47 2
		stty </dev/ttyld$i 300
		stty </dev/cuala$i 300
d53 4
d60 1
a60 1
		comcontrol /dev/ttyd$i dtrwait 100 drainwait 180
d63 4
a66 4
		stty </dev/ttyid$i crtscts 57600
		stty </dev/ttyld$i crtscts
		stty </dev/cuaia$i crtscts 57600
		stty </dev/cuala$i crtscts
d72 4
d80 4
a83 4
		stty </dev/ttyid$i clocal -hupcl 1200
		stty </dev/ttyld$i clocal  hupcl
		stty </dev/cuaia$i clocal -hupcl 1200
		stty </dev/cuala$i clocal  hupcl
d94 5
a98 1
	modem $*
d101 3
a103 3
		comcontrol /dev/ttyd$i dtrwait 0
		stty </dev/ttyid$i 115200
		stty </dev/cuaia$i 115200
d109 1
a109 1
#
d111 17
a127 5
#
# maybe		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		    2
# modem		  1
# terminal	0
@


1.4
log
@This is a purely cosmetic clean up.  Fix many cut and paste problems that
had turned tabs into spaces.
@
text
@d1 1
a1 1
# Change some defauls for serial devices.
@


1.4.4.1
log
@Merge from HEAD, except:

	Clients that used gnumalloc still do, despite the merge.  We're not
	bringing phkmalloc over.

	Thread stuff left out.

	PCCARD support left out.
@
text
@d1 1
a1 4
#!/bin/sh
# $Id$

# Change some defaults for serial devices.
a13 4

	ci=$1; shift	# call in device identifier
	co=$1; shift	# call out device identifier

d16 5
a20 5
		comcontrol /dev/tty$ci$i dtrwait 300 drainwait 0
		stty </dev/ttyi$ci$i -clocal  crtscts  hupcl 9600 reprint ^R
		stty </dev/ttyl$ci$i -clocal -crtscts -hupcl 0
		stty </dev/cuai$co$i -clocal  crtscts  hupcl 9600 reprint ^R
		stty </dev/cual$co$i -clocal -crtscts -hupcl 0
a25 4

	ci=$1; shift
	co=$1; shift

d29 2
a30 2
		stty </dev/ttyi$ci$i reprint undef
		stty </dev/cuai$co$i reprint undef
d32 1
a32 1
		stty </dev/ttyl$ci$i clocal
d35 2
a36 2
		stty </dev/ttyl$ci$i 300
		stty </dev/cual$co$i 300
a41 4

	ci=$1; shift
	co=$1; shift

d45 1
a45 1
		comcontrol /dev/tty$ci$i dtrwait 100 drainwait 180
d48 4
a51 4
		stty </dev/ttyi$ci$i crtscts 57600
		stty </dev/ttyl$ci$i crtscts
		stty </dev/cuai$co$i crtscts 57600
		stty </dev/cual$co$i crtscts
a56 4

	ci=$1; shift
	co=$1; shift

d61 4
a64 4
		stty </dev/ttyi$ci$i clocal -hupcl 1200
		stty </dev/ttyl$ci$i clocal  hupcl
		stty </dev/cuai$co$i clocal -hupcl 1200
		stty </dev/cual$co$i clocal  hupcl
d75 1
a75 5

	ci=$1; shift
	co=$1; shift

	modem $ci $co $*
d78 3
a80 3
		comcontrol /dev/tty$ci$i dtrwait 0
		stty </dev/ttyi$ci$i 115200
		stty </dev/cuai$co$i 115200
d86 1
a86 1

d88 5
a92 17
# $1 is the call in device identifier, $2 is the call out device identifier
# and the remainder of the line lists the device numbers.

# Initialize assorted 8250-16550 (sio) ports.
# maybe    d a  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 a      2
# modem    d a    1
# terminal d a  0

# Initialize all ports on a Cyclades-8yo.
# modem    c c  0 1 2 3 4 5 6 7

# Initialize all ports on a Cyclades-16ye.
# modem    c c  0 1 2 3 4 5 6 7 8 9 a b c d e f 

# Initialize all ports on a Digiboard 8.
# modem    D D  0 1 2 3 4 5 6 7
@


1.4.4.2
log
@This 3rd mega-commit should hopefully bring us back to where we were.
I can get it to `make world' succesfully, anyway!
@
text
@d1 4
a4 1
# Change some defauls for serial devices.
d17 4
d23 5
a27 5
		comcontrol /dev/ttyd$i dtrwait 300 drainwait 0
		stty </dev/ttyid$i -clocal  crtscts  hupcl 9600 reprint ^R
		stty </dev/ttyld$i -clocal -crtscts -hupcl 0
		stty </dev/cuaia$i -clocal  crtscts  hupcl 9600 reprint ^R
		stty </dev/cuala$i -clocal -crtscts -hupcl 0
d33 4
d40 2
a41 2
		stty </dev/ttyid$i reprint undef
		stty </dev/cuaia$i reprint undef
d43 1
a43 1
		stty </dev/ttyld$i clocal
d46 2
a47 2
		stty </dev/ttyld$i 300
		stty </dev/cuala$i 300
d53 4
d60 1
a60 1
		comcontrol /dev/ttyd$i dtrwait 100 drainwait 180
d63 4
a66 4
		stty </dev/ttyid$i crtscts 57600
		stty </dev/ttyld$i crtscts
		stty </dev/cuaia$i crtscts 57600
		stty </dev/cuala$i crtscts
d72 4
d80 4
a83 4
		stty </dev/ttyid$i clocal -hupcl 1200
		stty </dev/ttyld$i clocal  hupcl
		stty </dev/cuaia$i clocal -hupcl 1200
		stty </dev/cuala$i clocal  hupcl
d94 5
a98 1
	modem $*
d101 3
a103 3
		comcontrol /dev/ttyd$i dtrwait 0
		stty </dev/ttyid$i 115200
		stty </dev/cuaia$i 115200
d109 1
a109 1
#
d111 17
a127 5
#
# maybe		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		    2
# modem		  1
# terminal	0
@


1.4.4.3
log
@Merged with HEAD: fixed spelling and added support for Cyclades and
Digiboard devices.
@
text
@d1 1
a1 4
#!/bin/sh
# $Id$

# Change some defaults for serial devices.
a13 4

	ci=$1; shift	# call in device identifier
	co=$1; shift	# call out device identifier

d16 5
a20 5
		comcontrol /dev/tty$ci$i dtrwait 300 drainwait 0
		stty </dev/ttyi$ci$i -clocal  crtscts  hupcl 9600 reprint ^R
		stty </dev/ttyl$ci$i -clocal -crtscts -hupcl 0
		stty </dev/cuai$co$i -clocal  crtscts  hupcl 9600 reprint ^R
		stty </dev/cual$co$i -clocal -crtscts -hupcl 0
a25 4

	ci=$1; shift
	co=$1; shift

d29 2
a30 2
		stty </dev/ttyi$ci$i reprint undef
		stty </dev/cuai$co$i reprint undef
d32 1
a32 1
		stty </dev/ttyl$ci$i clocal
d35 2
a36 2
		stty </dev/ttyl$ci$i 300
		stty </dev/cual$co$i 300
a41 4

	ci=$1; shift
	co=$1; shift

d45 1
a45 1
		comcontrol /dev/tty$ci$i dtrwait 100 drainwait 180
d48 4
a51 4
		stty </dev/ttyi$ci$i crtscts 57600
		stty </dev/ttyl$ci$i crtscts
		stty </dev/cuai$co$i crtscts 57600
		stty </dev/cual$co$i crtscts
a56 4

	ci=$1; shift
	co=$1; shift

d61 4
a64 4
		stty </dev/ttyi$ci$i clocal -hupcl 1200
		stty </dev/ttyl$ci$i clocal  hupcl
		stty </dev/cuai$co$i clocal -hupcl 1200
		stty </dev/cual$co$i clocal  hupcl
d75 1
a75 5

	ci=$1; shift
	co=$1; shift

	modem $ci $co $*
d78 3
a80 3
		comcontrol /dev/tty$ci$i dtrwait 0
		stty </dev/ttyi$ci$i 115200
		stty </dev/cuai$co$i 115200
d86 1
a86 1

d88 5
a92 17
# $1 is the call in device identifier, $2 is the call out device identifier
# and the remainder of the line lists the device numbers.

# Initialize assorted 8250-16550 (sio) ports.
# maybe    d a  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 a      2
# modem    d a    1
# terminal d a  0

# Initialize all ports on a Cyclades-8yo.
# modem    c c  0 1 2 3 4 5 6 7

# Initialize all ports on a Cyclades-16ye.
# modem    c c  0 1 2 3 4 5 6 7 8 9 a b c d e f 

# Initialize all ports on a Digiboard 8.
# modem    D D  0 1 2 3 4 5 6 7
@


1.4.4.4
log
@$Id$ -> $FreeBSD$
@
text
@d2 1
a2 1
# $FreeBSD$
@


1.3
log
@Add drainwait option examples
@
text
@d3 1
a3 1
#       dtrwait 300 drainwait 0
d44 2
a45 1
		comcontrol /dev/ttyd$i dtrwait 100 drainwait 180     # may depend on modem
@


1.2
log
@cua*0? --> cua*a?
@
text
@d3 1
a3 1
#	dtrwait 300
d16 1
a16 1
		comcontrol /dev/ttyd$i dtrwait 300
d44 1
a44 1
		comcontrol /dev/ttyd$i dtrwait 100	# may depend on modem
@


1.1
log
@Now rc.serial used for initial setup of serial lines
@
text
@d19 2
a20 2
		stty </dev/cuai0$i -clocal  crtscts  hupcl 9600 reprint ^R
		stty </dev/cual0$i -clocal -crtscts -hupcl 0
d30 1
a30 1
		stty </dev/cuai0$i reprint undef
d36 1
a36 1
		stty </dev/cual0$i 300
d49 2
a50 2
		stty </dev/cuai0$i crtscts 57600
		stty </dev/cual0$i crtscts
d62 2
a63 2
		stty </dev/cuai0$i clocal -hupcl 1200
		stty </dev/cual0$i clocal  hupcl
d79 1
a79 1
		stty </dev/cuai0$i 115200
@
