aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>2003-05-04 22:46:33 +0000
committerBruce Evans <bde@FreeBSD.org>2003-05-04 22:46:33 +0000
commit4740b116be088bcd927b6c56f78710ede5e64f08 (patch)
tree5904092124ad23470eff16aefdefe13183707bdf /etc
parente8baaa70629833b245540b4915c58ee4ae2ec446 (diff)
downloadsrc-4740b116be088bcd927b6c56f78710ede5e64f08.tar.gz
src-4740b116be088bcd927b6c56f78710ede5e64f08.zip
When resetting to defaults, reset drainwait to the current default pf
`sysctl -n kern.drainwait` instead of to the boot-time default of 300.
Notes
Notes: svn path=/head/; revision=114682
Diffstat (limited to 'etc')
-rw-r--r--etc/rc.d/serial5
1 files 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 <sys/ttydefaults.h> = 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