serial (d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf) | serial (4722ceb7d53e76507c76e053caab6b6f7b24ecef) |
---|---|
1#!/bin/sh 2# 3# Copyright (c) 1996 Andrey A. Chernov 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 21 unchanged lines hidden (view full) --- 30# REQUIRE: root 31# KEYWORD: nojail 32 33# Change some defaults for serial devices. 34# Standard defaults are: 35# dtrwait 300 drainwait `sysctl -n kern.drainwait` 36# initial cflag from <sys/ttydefaults.h> = cread cs8 hupcl 37# initial iflag, lflag and oflag all 0 | 1#!/bin/sh 2# 3# Copyright (c) 1996 Andrey A. Chernov 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 21 unchanged lines hidden (view full) --- 30# REQUIRE: root 31# KEYWORD: nojail 32 33# Change some defaults for serial devices. 34# Standard defaults are: 35# dtrwait 300 drainwait `sysctl -n kern.drainwait` 36# initial cflag from <sys/ttydefaults.h> = cread cs8 hupcl 37# initial iflag, lflag and oflag all 0 |
38# speed 9600 | 38# speed 115200 |
39# special chars from <sys/ttydefaults.h> 40# nothing locked 41# except for serial consoles the initial iflag, lflag and oflag are from 42# <sys/ttydefaults.h> and clocal is locked on. 43 44default() { 45 # Reset everything changed by the other functions to initial defaults. 46 47 dc=$1; shift # device name character 48 drainwait=`sysctl -n kern.drainwait` 49 50 for i in $* 51 do 52 comcontrol /dev/tty${dc}${i} dtrwait 300 drainwait $drainwait | 39# special chars from <sys/ttydefaults.h> 40# nothing locked 41# except for serial consoles the initial iflag, lflag and oflag are from 42# <sys/ttydefaults.h> and clocal is locked on. 43 44default() { 45 # Reset everything changed by the other functions to initial defaults. 46 47 dc=$1; shift # device name character 48 drainwait=`sysctl -n kern.drainwait` 49 50 for i in $* 51 do 52 comcontrol /dev/tty${dc}${i} dtrwait 300 drainwait $drainwait |
53 stty < /dev/tty${dc}${i}.init -clocal crtscts hupcl 9600 reprint ^R | 53 stty < /dev/tty${dc}${i}.init -clocal crtscts hupcl 115200 reprint ^R |
54 stty < /dev/tty${dc}${i}.lock -clocal -crtscts -hupcl 0 | 54 stty < /dev/tty${dc}${i}.lock -clocal -crtscts -hupcl 0 |
55 stty < /dev/cua${dc}${i}.init -clocal crtscts hupcl 9600 reprint ^R | 55 stty < /dev/cua${dc}${i}.init -clocal crtscts hupcl 115200 reprint ^R |
56 stty < /dev/cua${dc}${i}.lock -clocal -crtscts -hupcl 0 57 done 58} 59 60maybe() { 61 # Special settings. 62 63 dc=$1; shift --- 104 unchanged lines hidden --- | 56 stty < /dev/cua${dc}${i}.lock -clocal -crtscts -hupcl 0 57 done 58} 59 60maybe() { 61 # Special settings. 62 63 dc=$1; shift --- 104 unchanged lines hidden --- |