diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-02-10 17:51:48 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-02-10 17:51:48 +0000 |
commit | 9c4375525b7192db326e83cfbbfbc0be074fbdbf (patch) | |
tree | 860c75a93394fc3ab81c1619ddc858668c7c0322 /etc | |
parent | aea5adb130496bce7de5b541d8b725bc9f284c73 (diff) |
initial import
Diffstat (limited to 'etc')
-rw-r--r-- | etc/rc.wscons | 117 | ||||
-rw-r--r-- | etc/wscons.conf | 29 |
2 files changed, 146 insertions, 0 deletions
diff --git a/etc/rc.wscons b/etc/rc.wscons new file mode 100644 index 00000000000..43d27c4a413 --- /dev/null +++ b/etc/rc.wscons @@ -0,0 +1,117 @@ +# $OpenBSD: rc.wscons,v 1.1 2001/02/10 17:51:47 mickey Exp $ +# $NetBSD: rc.wscons,v 1.3 1999/05/15 14:28:14 drochner Exp $ + +wscfg=/usr/sbin/wsconscfg +wsfld=/usr/sbin/wsfontload +config=/etc/wscons.conf +usage="Usage: wsconfig [-n] [-f configfile] [-font fontpgm] [-screen screenpgm]" +DOIT= + +while [ $# -gt 0 ]; do + case $1 in + -n) + DOIT=echo + ;; + -f) + config=$2 + shift + ;; + -font) + wsfld=$2 + shift + ;; + -screen) + wscfg=$2 + shift + ;; + *) + echo $usage + exit 1 + ;; + esac + shift +done + + +# args mean: +# screen idx scr emul +# font name width height enc file +( while read type arg1 arg2 arg3 arg4 arg5; do + case "$type" in + \#*|"") + continue + ;; + font) + name=$arg1 + width=$arg2 + height=$arg3 + enc=$arg4 + file=$arg5 + cmd=$wsfld + + case $width in + -) + ;; + *) + cmd="$cmd -w $width" + ;; + esac + case $height in + -) + ;; + *) + cmd="$cmd -h $height" + ;; + esac + case $enc in + -) + ;; + *) + cmd="$cmd -e $enc" + ;; + esac + cmd="$cmd -N $name $file" + eval $DOIT $cmd + ;; + screen) + idx=$arg1 + scr=$arg2 + emul=$arg3 + cmd=$wscfg + + case $scr in + -) + ;; + *) + cmd="$cmd -t $scr" + ;; + esac + case $emul in + -) + ;; + *) + cmd="$cmd -e $emul" + ;; + esac + cmd="$cmd $idx" + eval $DOIT $cmd + ;; + keyboard) + kbd=$arg1 + cmd=$wscfg + case $kbd in + -|auto) + cmd="$cmd -k" + ;; + *) + cmd="$cmd -k $kbd" + ;; + esac + eval $DOIT $cmd + ;; + mux) + cmd="$wscfg -m $arg1" + eval $DOIT $cmd + ;; + esac +done ) < $config diff --git a/etc/wscons.conf b/etc/wscons.conf new file mode 100644 index 00000000000..9e49cecb2b6 --- /dev/null +++ b/etc/wscons.conf @@ -0,0 +1,29 @@ +# $OpenBSD: wscons.conf,v 1.1 2001/02/10 17:51:47 mickey Exp $ +# $NetBSD: wscons.conf,v 1.4 1999/07/29 19:26:08 augustss Exp $ +# +# workstation console configuration + +# fonts to load +# name width height enc file +#font ibm - 8 ibm /usr/share/pcvt/fonts/vt220l.808 + +# Note: "pcvt" encoded fonts are only useful with the "*bf" screen types +# of the "vga" driver. The kernel must be compiled with the option +# "WSCONS_SUPPORT_PCVTFONTS" turned on. See vga(4). +#font pcvt - - pcvt /usr/share/pcvt/fonts/vt220h.816 +#font pcvt - 8 pcvt /usr/share/pcvt/fonts/vt220h.808 + +# screens to create +# idx screen emul +# Screen 0 is already configured as console in most cases. +# Uncomment if a serial console is used. +#screen 0 - vt100 +screen 1 - vt100 +screen 2 - vt100 +screen 3 - vt100 +screen 4 - - +#screen 4 80x25bf vt100 +#screen 5 80x50 vt100 + +#keyboard auto +mux 1 |