diff options
author | hm <hm@FreeBSD.org> | 2000-03-31 08:39:34 +0000 |
---|---|---|
committer | hm <hm@FreeBSD.org> | 2000-03-31 08:39:34 +0000 |
commit | 82f49df3527a7a33a90f907207f4b4e0e540cf5a (patch) | |
tree | 2aacd87ad21999f4526ce56f78bd149b153f9ab5 /usr.sbin | |
parent | 8a5adbab4a53ce87f8eaf5e2a4dd216d65d22d88 (diff) | |
download | FreeBSD-src-82f49df3527a7a33a90f907207f4b4e0e540cf5a.zip FreeBSD-src-82f49df3527a7a33a90f907207f4b4e0e540cf5a.tar.gz |
exchange rc.local for a more modern, up to date and ready to run
example configuration startup script.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pcvt/Misc/Etc/Makefile | 2 | ||||
-rw-r--r-- | usr.sbin/pcvt/Misc/Etc/pcvt.sh | 163 | ||||
-rw-r--r-- | usr.sbin/pcvt/Misc/Etc/rc.local | 264 |
3 files changed, 164 insertions, 265 deletions
diff --git a/usr.sbin/pcvt/Misc/Etc/Makefile b/usr.sbin/pcvt/Misc/Etc/Makefile index 3c09ce5..60b506d 100644 --- a/usr.sbin/pcvt/Misc/Etc/Makefile +++ b/usr.sbin/pcvt/Misc/Etc/Makefile @@ -1,6 +1,6 @@ # $FreeBSD$ -FILES= Termcap Terminfo pcvt.el rc.local xmodmap-german +FILES= Termcap Terminfo pcvt.el xmodmap-german pcvt.sh NOOBJ= diff --git a/usr.sbin/pcvt/Misc/Etc/pcvt.sh b/usr.sbin/pcvt/Misc/Etc/pcvt.sh new file mode 100644 index 0000000..cc3b34b --- /dev/null +++ b/usr.sbin/pcvt/Misc/Etc/pcvt.sh @@ -0,0 +1,163 @@ +#--------------------------------------------------------------------------- +# +# configure pcvt on system startup example +# ---------------------------------------- +# +# This script can be moved to /usr/local/etc/rc.d to +# configure the pcvt driver at system startup time. +# +# Please adjust the values in the configuration +# section below to suit your needs! +# +#--------------------------------------------------------------------------- +# +# last edit-date: [Fri Mar 31 10:40:18 2000] +# +# $FreeBSD$ +# +#--------------------------------------------------------------------------- + +############################################################################ +# configuration section +############################################################################ + +# path for pcvt's EGA/VGA download fonts +FONTP=/usr/share/misc/pcvtfonts + +pcvt_keymap="de" # keyboard map in /usr/share/misc/keycap.pcvt (or NO). +pcvt_keydel="0" # key repeat delay, 0-3 (250,500,750,1000 msec) (or NO). +pcvt_keyrate="5" # keyboard repetition rate 31-0 (2-30 char/sec) (or NO). +pcvt_keyrepeat="ON" # keyboard repeat ON or OFF (or NO). +pcvt_force24="NO" # force a 24 line display (when 25 possible) (or NO). +pcvt_hpext="YES" # use HP extensions (function keys labels) (or NO). +pcvt_lines="28" # lines (25, 28, 40, 50 or NO). +pcvt_blanktime="60" # blank time (in seconds) (or NO). +pcvt_cursorh="0" # cursor top scanline (topmost line is 0) (or NO). +pcvt_cursorl="16" # cursor low scanline (bottom line is 16) (or NO). +pcvt_monohigh="YES" # set intensity to high on monochrome monitors (or NO). + +############################################################################ +# nothing to configure from here +############################################################################ + +# check for correct driver and driver version matching + +if ispcvt -d /dev/ttyv0 ; then + echo "" + echo "configuring pcvt console driver" + +# get video adaptor type + + adaptor=`scon -d /dev/ttyv0 -a` + echo -n " video adaptor type is $adaptor, " + +# get monitor type (mono/color) + + monitor=`scon -d /dev/ttyv0 -m` + echo "monitor type is $monitor" + +# load fonts into vga + + if [ $adaptor = VGA ] ; then + echo -n ' loading fonts: 8x16:0,' + loadfont -d /dev/ttyv0 -c0 -f $FONTP/vt220l.816 + echo -n '1 ' + loadfont -d /dev/ttyv0 -c1 -f $FONTP/vt220h.816 + echo -n ' 8x14:0,' + loadfont -d /dev/ttyv0 -c2 -f $FONTP/vt220l.814 + echo -n '1 ' + loadfont -d /dev/ttyv0 -c3 -f $FONTP/vt220h.814 + echo -n ' 8x10:0,' + loadfont -d /dev/ttyv0 -c4 -f $FONTP/vt220l.810 + echo -n '1 ' + loadfont -d /dev/ttyv0 -c5 -f $FONTP/vt220h.810 + echo -n ' 8x8:0,' + loadfont -d /dev/ttyv0 -c6 -f $FONTP/vt220l.808 + echo '1 ' + loadfont -d /dev/ttyv0 -c7 -f $FONTP/vt220h.808 + +# setting screen sizes + + if [ "X${pcvt_lines}" = X"28" ]; then + size=-s28 + echo ' switching to 28 lines' + elif [ "X${pcvt_lines}" = X"40" ]; then + size=-s40 + echo ' switching to 40 lines' + elif [ "X${pcvt_lines}" = X"50" ]; then + size=-s50 + echo ' switching to 50 lines' + else + size=-s25 + echo ' switching to 25 lines' + fi + fi + +# use HP extensions to VT220 emulation ? + + if [ "X${pcvt_hpext}" != X"NO" ] ; then + emulation=-H + echo " setting emulation to VT220 with HP extensions" + else + emulation=-V + echo " setting emulation to VT220" + fi + +# for all screens do + + for device in /dev/ttyv* + do + scon -d$device $size $emulation >/dev/null 2>&1 + if [ $? != 0 ] + then + break 1 + fi + + if [ X${pcvt_cursorh} != X"NO" -a X${pcvt_cursorl} != X"NO" ] ; then + cursor -d$device -s$pcvt_cursorh -e$pcvt_cursorl + fi + +# if monochrome monitor, set color palette to use a higher intensity + + if [ X${pcvt_monohigh} != X"NO" -a $monitor = MONO -a $adaptor = VGA ] ; then + scon -d$device -p8,60,60,60 + fi + done + +# switch to screen 0 + + echo " switching to screen 0" + scon -d /dev/ttyv0 + +# set screensaver timeout + + if [ "X${pcvt_blanktime}" != X"NO" ]; then + echo " setting screensaver timeout to $pcvt_blanktime seconds" + scon -d /dev/ttyv0 -t$pcvt_blanktime + fi + +# setup keyboard for national keyboard layout + + if [ "X${pcvt_keymap}" != X"NO" ]; then + echo " switching national keyboard layout to $pcvt_keymap" + kcon -m $pcvt_keymap + fi + +# setup keyboard repeat delay value + + if [ "X${pcvt_keydel}" != X"NO" ]; then + echo " setting keyboard delay to $pcvt_keydel" + kcon -d$pcvt_keydel + fi + +# setup keyboard repeat rate value + + if [ "X${pcvt_keyrate}" != X"NO" ]; then + echo " setting keyboard repeat rate to $pcvt_keyrate" + kcon -r$pcvt_keyrate + fi + + echo "finished configuring pcvt console driver" +fi + +# EOF diff --git a/usr.sbin/pcvt/Misc/Etc/rc.local b/usr.sbin/pcvt/Misc/Etc/rc.local deleted file mode 100644 index 32d89c2..0000000 --- a/usr.sbin/pcvt/Misc/Etc/rc.local +++ /dev/null @@ -1,264 +0,0 @@ -#--------------------------------------------------------------------------- -# -# sample rc.local -# --------------- -# -# last edit-date: [Sun Feb 19 19:20:42 1995] -# -#--------------------------------------------------------------------------- -# -# NOTE: -# assumptions: - 8 screens configured -# - /dev/ttyv0 ... /dev/ttyv7 exist -# -#--------------------------------------------------------------------------- - -# start xdm on screen 8 -#xdm_start=YES -xdm_start=NO - -# setup german keyboard layout -#set_keybd=YES -set_keybd=NO - -# setup keyboard delay & rate -set_keydr=YES -# very fast settings -set_keydr_rate=0 -set_keydr_delay=0 -#set_keydr=NO - -# constuct a new /etc/motd file -construct_motd=NO -#construct_motd=YES - -# setup cursor start and end scanline -set_cursor=YES -#set_cursor=NO -# block cursor -set_cur_start=0 -set_cur_end=15 - -#----------------------------------------------------- -# construct /etc/motd file -#----------------------------------------------------- - -if [ X${construct_motd} = X"YES" ] -then - if [ -f /netbsd ] - then - if [ ! -f /etc/motd ]; then - install -c -o root -g wheel -m 664 /dev/null /etc/motd - fi - T=/tmp/_motd - rm -f $T - sysctl -n kern.version | sed 1q > $T - echo "" >> $T - sed '1,/^$/d' < /etc/motd >> $T - cmp -s $T /etc/motd || cp $T /etc/motd - rm -f $T - echo 'runtime link editor directory cache' - ldconfig - else - T=/tmp/_motd - rm -f $T - uname -a > $T - echo "" >> $T - sed '1,/^$/d' < /etc/motd >> $T - cp $T /etc/motd - chmod 644 /etc/motd - rm -f $T - - fi -fi - -#----------------------------------------------------- -# local daemons -#----------------------------------------------------- - -echo -n 'starting local daemons:' - -# Kerberos runs ONLY on the Kerberos server machine -if [ X${kerberos_server} = X"YES" ]; then - echo -n ' kerberos'; kerberos >> /var/log/kerberos.log & -fi - -echo '.' - -#----------------------------------------------------- -# check for correct driver and driver version matching -#----------------------------------------------------- - -if [ -x /usr/sbin/ispcvt ] -then - if /usr/sbin/ispcvt - then - -#-------------------------------------------------- -# loading fonts into vga -#-------------------------------------------------- - echo 'console driver type: pcvt' - if [ -x /usr/sbin/loadfont -a -x /usr/sbin/scon ] - then - adaptor=`/usr/sbin/scon -a` - if [ $adaptor = VGA ] - then - echo 'loading 25 lines base font into character set 0' - /usr/sbin/loadfont -c0 -f/usr/share/misc/pcvtfonts/vt220l.816 - echo 'loading 25 lines extension font into character set 1' - /usr/sbin/loadfont -c1 -f/usr/share/misc/pcvtfonts/vt220h.816 - echo 'loading 28 lines base font into character set 2' - /usr/sbin/loadfont -c2 -f/usr/share/misc/pcvtfonts/vt220l.814 - echo 'loading 28 lines extension font into character set 3' - /usr/sbin/loadfont -c3 -f/usr/share/misc/pcvtfonts/vt220h.814 - echo 'loading 40 lines base font into character set 4' - /usr/sbin/loadfont -c4 -f/usr/share/misc/pcvtfonts/vt220l.810 - echo 'loading 40 lines extension font into character set 5' - /usr/sbin/loadfont -c5 -f/usr/share/misc/pcvtfonts/vt220h.810 - echo 'loading 50 lines base font into character set 6' - /usr/sbin/loadfont -c6 -f/usr/share/misc/pcvtfonts/vt220l.808 - echo 'loading 50 lines extension font into character set 7' - /usr/sbin/loadfont -c7 -f/usr/share/misc/pcvtfonts/vt220h.808 - elif [ $adaptor = EGA ] - then - echo 'loading 25 lines base font into character set 0' - /usr/sbin/loadfont -c0 -f/usr/share/misc/pcvtfonts/vt220l.814 - echo 'loading 25 lines extension font into character set 1' - /usr/sbin/loadfont -c1 -f/usr/share/misc/pcvtfonts/vt220h.814 - echo 'loading 35 lines base font into character set 2' - /usr/sbin/loadfont -c2 -f/usr/share/misc/pcvtfonts/vt220l.810 - echo 'loading 35 lines extension font into character set 3' - /usr/sbin/loadfont -c3 -f/usr/share/misc/pcvtfonts/vt220h.810 - -# echo 'loading 43 lines base font into character set 2' -# /usr/sbin/loadfont -c2 -f/usr/share/misc/pcvtfonts/vt220l.808 -# echo 'loading 43 lines extension font into character set 3' -# /usr/sbin/loadfont -c3 -f/usr/share/misc/pcvtfonts/vt220h.808 - - fi - fi - -#-------------------------------------------------- -# setting screen sizes and emulation -#-------------------------------------------------- - if [ -x /usr/sbin/scon ] - then - if [ $adaptor = VGA ] - then - size=-s28 - echo 'switching to 28 lines and VT/HP-emulation' - elif [ $adaptor = EGA ] - then - size=-s25 - echo 'switching to 25 lines and VT/HP-emulation' - else - size= - echo 'switching to VT/HP-emulation' - fi - -# get monitor type (mono/color) - - monitor=`/usr/sbin/scon -m` - -# for all screens do - - for device in /dev/ttyv* - do - -# setup HP mode - - /usr/sbin/scon -d$device $size -H - -# setup cursor size - - if [ X${set_cursor} = X"YES" -a -x /usr/sbin/cursor ] - then - /usr/sbin/cursor -d$device -s$set_cur_start -e$set_cur_end - fi - -# if monochrome monitor, set color palette to use a higher intensity - - if [ $monitor = MONO ] - then - if [ $adaptor = VGA ] - then - /usr/sbin/scon -d$device -p8,60,60,60 - fi - fi - done - -# switch to screen 0 - - /usr/sbin/scon -c0 - -# set screensaver timeout to one minute - - /usr/sbin/scon -t360 - fi - -#------------------------------------------------------ -# if desired, setup keyboard for german keyboard layout -#------------------------------------------------------ - - if [ X${set_keybd} = X"YES" -a -x /usr/sbin/kcon ] - then - echo 'switching to german keyboard layout' - /usr/sbin/kcon -m de - fi - -#------------------------------------------------------ -# if desired, setup rate and delay keyboard values -#------------------------------------------------------ - - if [ X${set_keydr} = X"YES" -a -x /usr/sbin/kcon ] - then - echo setting keyboard typematic rate = $set_keydr_rate and delay = $set_keydr_delay - /usr/sbin/kcon -r $set_keydr_rate -d $set_keydr_delay - fi - -#-------------------------------------------------- -# if desired, start xdm on screen 8 -#-------------------------------------------------- - - if [ X${xdm_start} = X"YES" -a -x /usr/X386/bin/xdm ] - then - /usr/sbin/scon -c 7 - /usr/X386/bin/xdm - sleep 5 - /usr/sbin/scon -c 0 - fi - -#-------------------------------------------------- -# cp /etc/ttys corresponding to console driver -#-------------------------------------------------- - - if [ -f /etc/ttys.pcvt ] - then - echo 'copying /etc/ttys.pcvt -> /etc/ttys' - cp /etc/ttys.pcvt /etc/ttys - fi - - else - echo 'console driver type: not pcvt or pcvt utility/driver mismatch:' - echo '--------------------------------------------------------------' - /usr/sbin/ispcvt -v - echo '--------------------------------------------------------------' - if [ -f /etc/ttys.pccons ] - then - echo 'copying /etc/ttys.pccons -> /etc/ttys' - cp /etc/ttys.pccons /etc/ttys - fi - fi -else - echo 'console driver type: not pcvt' - if [ -f /etc/ttys.pccons ] - then - echo 'copying /etc/ttys.pccons -> /etc/ttys' - cp /etc/ttys.pccons /etc/ttys - fi -fi - -echo - -# EOF ---------------------------------------------------------------------- - |