summaryrefslogtreecommitdiff
path: root/sh.Linux
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-04-17 09:32:18 +0000
committerRoy Marples <roy@marples.name>2007-04-17 09:32:18 +0000
commitf657d87b997f5b599d74a8f2eb6fef8dd6381550 (patch)
tree5bd3799657e97edabe5ff83e5ac145f3d15931d8 /sh.Linux
parent0f92b5e7df4ead366984b5624de12446bd968478 (diff)
downloadopenrc-f657d87b997f5b599d74a8f2eb6fef8dd6381550.tar.gz
openrc-f657d87b997f5b599d74a8f2eb6fef8dd6381550.tar.bz2
openrc-f657d87b997f5b599d74a8f2eb6fef8dd6381550.tar.xz
Rationalise our colour usage a little.
Diffstat (limited to 'sh.Linux')
-rwxr-xr-xsh.Linux/init.sh17
1 files changed, 10 insertions, 7 deletions
diff --git a/sh.Linux/init.sh b/sh.Linux/init.sh
index 74b88e0..1f3f301 100755
--- a/sh.Linux/init.sh
+++ b/sh.Linux/init.sh
@@ -88,17 +88,20 @@ get_KV() {
# Try and set a font as early as we can
ttydev=${CONSOLE:-/dev/tty1}
-if [ -c "${ttydev}" ] ; then
- ttydev="-C ${ttydev}"
-else
- [ -c /dev/vc/1 ] && ttydev="-C /dev/vc/1" || ttydev=
+if [ ! -c "${ttydev}" ] ; then
+ [ -c /dev/vc/1 ] && ttydev="/dev/vc/1" || ttydev=
fi
[ -r "${RC_LIBDIR}"/console/font ] \
- && /bin/setfont ${ttydev} "${RC_LIBDIR}"/console/font
+ && /bin/setfont ${ttydev:+-C} ${ttydev} "${RC_LIBDIR}"/console/font
[ -r "${RC_LIBDIR}"/console/map ] \
- && /bin/setfont ${ttydev} -m "${RC_LIBDIR}"/console/map
+ && /bin/setfont ${ttydev:+-C} ${ttydev} -m "${RC_LIBDIR}"/console/map
[ -r "${RC_LIBDIR}"/console/unimap ] \
- && /bin/setfont ${ttydev} -u "${RC_LIBDIR}"/console/unimap
+ && /bin/setfont ${ttydev:+-C} ${ttydev} -u "${RC_LIBDIR}"/console/unimap
+if [ -e "${RC_LIBDIR}"/console/unicode ] ; then
+ eval printf "\033%%G" ${ttydev:+>} ${ttydev}
+else
+ eval printf "\033(K" ${ttydev:+>} ${ttydev}
+fi
unset ttydev
. /etc/init.d/functions.sh