1 #---------------------------------------------------------------------------
3 # configure pcvt on system startup example
4 # ----------------------------------------
6 # This script can be moved to /usr/local/etc/rc.d to
7 # configure the pcvt driver at system startup time.
9 # Please adjust the values in the configuration
10 # section below to suit your needs!
12 #---------------------------------------------------------------------------
14 # last edit-date: [Fri Mar 31 10:40:18 2000]
18 #---------------------------------------------------------------------------
20 ############################################################################
21 # configuration section
22 ############################################################################
24 # path for pcvt's EGA/VGA download fonts
25 FONTP=/usr/share/misc/pcvtfonts
27 pcvt_keymap="de" # keyboard map in /usr/share/misc/keycap.pcvt (or NO).
28 pcvt_keydel="0" # key repeat delay, 0-3 (250,500,750,1000 msec) (or NO).
29 pcvt_keyrate="5" # keyboard repetition rate 31-0 (2-30 char/sec) (or NO).
30 pcvt_keyrepeat="ON" # keyboard repeat ON or OFF (or NO).
31 pcvt_force24="NO" # force a 24 line display (when 25 possible) (or NO).
32 pcvt_hpext="YES" # use HP extensions (function keys labels) (or NO).
33 pcvt_lines="28" # lines (25, 28, 40, 50 or NO).
34 pcvt_blanktime="60" # blank time (in seconds) (or NO).
35 pcvt_cursorh="0" # cursor top scanline (topmost line is 0) (or NO).
36 pcvt_cursorl="16" # cursor low scanline (bottom line is 16) (or NO).
37 pcvt_monohigh="YES" # set intensity to high on monochrome monitors (or NO).
39 ############################################################################
40 # nothing to configure from here
41 ############################################################################
43 # check for correct driver and driver version matching
45 if ispcvt -d /dev/ttyv0 ; then
47 echo "configuring pcvt console driver"
49 # get video adaptor type
51 adaptor=`scon -d /dev/ttyv0 -a`
52 echo -n " video adaptor type is $adaptor, "
54 # get monitor type (mono/color)
56 monitor=`scon -d /dev/ttyv0 -m`
57 echo "monitor type is $monitor"
61 if [ $adaptor = VGA ] ; then
62 echo -n ' loading fonts: 8x16:0,'
63 loadfont -d /dev/ttyv0 -c0 -f $FONTP/vt220l.816
65 loadfont -d /dev/ttyv0 -c1 -f $FONTP/vt220h.816
67 loadfont -d /dev/ttyv0 -c2 -f $FONTP/vt220l.814
69 loadfont -d /dev/ttyv0 -c3 -f $FONTP/vt220h.814
71 loadfont -d /dev/ttyv0 -c4 -f $FONTP/vt220l.810
73 loadfont -d /dev/ttyv0 -c5 -f $FONTP/vt220h.810
75 loadfont -d /dev/ttyv0 -c6 -f $FONTP/vt220l.808
77 loadfont -d /dev/ttyv0 -c7 -f $FONTP/vt220h.808
79 # setting screen sizes
81 if [ "X${pcvt_lines}" = X"28" ]; then
83 echo ' switching to 28 lines'
84 elif [ "X${pcvt_lines}" = X"40" ]; then
86 echo ' switching to 40 lines'
87 elif [ "X${pcvt_lines}" = X"50" ]; then
89 echo ' switching to 50 lines'
92 echo ' switching to 25 lines'
96 # use HP extensions to VT220 emulation ?
98 if [ "X${pcvt_hpext}" != X"NO" ] ; then
100 echo " setting emulation to VT220 with HP extensions"
103 echo " setting emulation to VT220"
108 for device in /dev/ttyv*
110 scon -d$device $size $emulation >/dev/null 2>&1
116 if [ X${pcvt_cursorh} != X"NO" -a X${pcvt_cursorl} != X"NO" ] ; then
117 cursor -d$device -s$pcvt_cursorh -e$pcvt_cursorl
120 # if monochrome monitor, set color palette to use a higher intensity
122 if [ X${pcvt_monohigh} != X"NO" -a $monitor = MONO -a $adaptor = VGA ] ; then
123 scon -d$device -p8,60,60,60
129 echo " switching to screen 0"
132 # set screensaver timeout
134 if [ "X${pcvt_blanktime}" != X"NO" ]; then
135 echo " setting screensaver timeout to $pcvt_blanktime seconds"
136 scon -d /dev/ttyv0 -t$pcvt_blanktime
139 # setup keyboard for national keyboard layout
141 if [ "X${pcvt_keymap}" != X"NO" ]; then
142 echo " switching national keyboard layout to $pcvt_keymap"
146 # setup keyboard repeat delay value
148 if [ "X${pcvt_keydel}" != X"NO" ]; then
149 echo " setting keyboard delay to $pcvt_keydel"
153 # setup keyboard repeat rate value
155 if [ "X${pcvt_keyrate}" != X"NO" ]; then
156 echo " setting keyboard repeat rate to $pcvt_keyrate"
160 echo "finished configuring pcvt console driver"