From 4740b116be088bcd927b6c56f78710ede5e64f08 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Sun, 4 May 2003 22:46:33 +0000 Subject: [PATCH] When resetting to defaults, reset drainwait to the current default pf `sysctl -n kern.drainwait` instead of to the boot-time default of 300. --- etc/rc.d/serial | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/etc/rc.d/serial b/etc/rc.d/serial index d9802d8aa1ff..a7975ec037fb 100644 --- a/etc/rc.d/serial +++ b/etc/rc.d/serial @@ -33,7 +33,7 @@ # Change some defaults for serial devices. # Standard defaults are: -# dtrwait 300 drainwait 0 +# dtrwait 300 drainwait `sysctl -n kern.drainwait` # initial cflag from = cread cs8 hupcl # initial iflag, lflag and oflag all 0 # speed 9600 @@ -47,10 +47,11 @@ default() { ci=$1; shift # call in device identifier co=$1; shift # call out device identifier + drainwait=`sysctl -n kern.drainwait` for i in $* do - comcontrol /dev/tty${ci}${i} dtrwait 300 drainwait 300 + comcontrol /dev/tty${ci}${i} dtrwait 300 drainwait $drainwait 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