summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrgrimes <rgrimes@FreeBSD.org>1995-05-26 18:06:52 +0000
committerrgrimes <rgrimes@FreeBSD.org>1995-05-26 18:06:52 +0000
commitc6563af053bb945798648d329cceeba5bccbce41 (patch)
treec923078a4fc7b12cc01168c3591f4656b75e434c
parent245e67e789914da441f9f2154cb981dc6e7d68f0 (diff)
downloadFreeBSD-src-c6563af053bb945798648d329cceeba5bccbce41.zip
FreeBSD-src-c6563af053bb945798648d329cceeba5bccbce41.tar.gz
Reviewed by: sos
Submitted by: bde rc.i386 failed messily when I used a serial console. Editors note: Use file redirection so that all the kbdcontrol and vidcontrol commands act upon /dev/ttyv0 instead of stdin. Though this feature is not documented it is the intended behavior of {vid,kbd}control and shall be documented in the future as such.
-rw-r--r--etc/etc.amd64/rc.amd6424
-rw-r--r--etc/etc.i386/rc.i38624
2 files changed, 28 insertions, 20 deletions
diff --git a/etc/etc.amd64/rc.amd64 b/etc/etc.amd64/rc.amd64
index 418b407..cfe5f0e 100644
--- a/etc/etc.amd64/rc.amd64
+++ b/etc/etc.amd64/rc.amd64
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: rc.i386,v 1.7 1995/04/10 01:39:13 rgrimes Exp $
+# $Id: rc.i386,v 1.8 1995/04/13 21:23:17 rgrimes Exp $
# Do i386 specific processing
#
@@ -19,6 +19,10 @@ fi
####### Syscons section ########
##########################################################################
+# stdin must be redirected because it might be for a serial console
+kbddev=/dev/ttyv0
+viddev=/dev/ttyv0
+
# don't change these, they're modified below
kbdadjust=NO
vidadjust=NO
@@ -36,12 +40,12 @@ vidadjust=NO
# keymap
if [ "X${keymap}" != X"NO" ]; then
- echo -n ' keymap'; kbdcontrol -l ${keymap}
+ echo -n ' keymap'; kbdcontrol <${kbddev} -l ${keymap}
fi
# keyrate
if [ "X${keyrate}" != X"NO" ]; then
- echo -n ' keyrate'; kbdcontrol -r ${keyrate}
+ echo -n ' keyrate'; kbdcontrol <${kbddev} -r ${keyrate}
fi
# change function keys
@@ -50,7 +54,7 @@ if [ "X${keychange}" != X"NO" ]; then
set - ${keychange}
while [ $# -gt 0 ]
do
- kbdcontrol -f "$1" "$2"
+ kbdcontrol <${kbddev} -f "$1" "$2"
shift; shift
done
fi
@@ -62,32 +66,32 @@ fi
# cursor type
if [ "X${cursor}" != X"NO" ]; then
- echo -n ' cursor'; vidcontrol -c ${cursor}
+ echo -n ' cursor'; vidcontrol <${viddev} -c ${cursor}
fi
# screen mapping
if [ "X${scrnmap}" != X"NO" ]; then
- echo -n ' screen_map'; vidcontrol -l ${scrnmap}
+ echo -n ' screen_map'; vidcontrol <${viddev} -l ${scrnmap}
fi
# font 8x16
if [ "X${font8x16}" != X"NO" ]; then
- echo -n ' font8x16'; vidcontrol -f 8x16 ${font8x16}
+ echo -n ' font8x16'; vidcontrol <${viddev} -f 8x16 ${font8x16}
fi
# font 8x14
if [ "X${font8x14}" != X"NO" ]; then
- echo -n ' font8x14'; vidcontrol -f 8x14 ${font8x14}
+ echo -n ' font8x14'; vidcontrol <${viddev} -f 8x14 ${font8x14}
fi
# font 8x8
if [ "X${font8x8}" != X"NO" ]; then
- echo -n ' font8x8'; vidcontrol -f 8x8 ${font8x8}
+ echo -n ' font8x8'; vidcontrol <${viddev} -f 8x8 ${font8x8}
fi
# blank time
if [ "X${blanktime}" != X"NO" ]; then
- echo -n ' blank_time'; vidcontrol -t ${blanktime}
+ echo -n ' blank_time'; vidcontrol <${viddev} -t ${blanktime}
fi
[ "X${vidadjust}" != X"NO" ] && echo ']'
diff --git a/etc/etc.i386/rc.i386 b/etc/etc.i386/rc.i386
index 418b407..cfe5f0e 100644
--- a/etc/etc.i386/rc.i386
+++ b/etc/etc.i386/rc.i386
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $Id: rc.i386,v 1.7 1995/04/10 01:39:13 rgrimes Exp $
+# $Id: rc.i386,v 1.8 1995/04/13 21:23:17 rgrimes Exp $
# Do i386 specific processing
#
@@ -19,6 +19,10 @@ fi
####### Syscons section ########
##########################################################################
+# stdin must be redirected because it might be for a serial console
+kbddev=/dev/ttyv0
+viddev=/dev/ttyv0
+
# don't change these, they're modified below
kbdadjust=NO
vidadjust=NO
@@ -36,12 +40,12 @@ vidadjust=NO
# keymap
if [ "X${keymap}" != X"NO" ]; then
- echo -n ' keymap'; kbdcontrol -l ${keymap}
+ echo -n ' keymap'; kbdcontrol <${kbddev} -l ${keymap}
fi
# keyrate
if [ "X${keyrate}" != X"NO" ]; then
- echo -n ' keyrate'; kbdcontrol -r ${keyrate}
+ echo -n ' keyrate'; kbdcontrol <${kbddev} -r ${keyrate}
fi
# change function keys
@@ -50,7 +54,7 @@ if [ "X${keychange}" != X"NO" ]; then
set - ${keychange}
while [ $# -gt 0 ]
do
- kbdcontrol -f "$1" "$2"
+ kbdcontrol <${kbddev} -f "$1" "$2"
shift; shift
done
fi
@@ -62,32 +66,32 @@ fi
# cursor type
if [ "X${cursor}" != X"NO" ]; then
- echo -n ' cursor'; vidcontrol -c ${cursor}
+ echo -n ' cursor'; vidcontrol <${viddev} -c ${cursor}
fi
# screen mapping
if [ "X${scrnmap}" != X"NO" ]; then
- echo -n ' screen_map'; vidcontrol -l ${scrnmap}
+ echo -n ' screen_map'; vidcontrol <${viddev} -l ${scrnmap}
fi
# font 8x16
if [ "X${font8x16}" != X"NO" ]; then
- echo -n ' font8x16'; vidcontrol -f 8x16 ${font8x16}
+ echo -n ' font8x16'; vidcontrol <${viddev} -f 8x16 ${font8x16}
fi
# font 8x14
if [ "X${font8x14}" != X"NO" ]; then
- echo -n ' font8x14'; vidcontrol -f 8x14 ${font8x14}
+ echo -n ' font8x14'; vidcontrol <${viddev} -f 8x14 ${font8x14}
fi
# font 8x8
if [ "X${font8x8}" != X"NO" ]; then
- echo -n ' font8x8'; vidcontrol -f 8x8 ${font8x8}
+ echo -n ' font8x8'; vidcontrol <${viddev} -f 8x8 ${font8x8}
fi
# blank time
if [ "X${blanktime}" != X"NO" ]; then
- echo -n ' blank_time'; vidcontrol -t ${blanktime}
+ echo -n ' blank_time'; vidcontrol <${viddev} -t ${blanktime}
fi
[ "X${vidadjust}" != X"NO" ] && echo ']'
OpenPOWER on IntegriCloud