diff options
author | Leah Neukirchen <leah@vuxu.org> | 2022-01-07 01:02:22 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2022-01-07 01:02:22 +0100 |
commit | 07ba00058350948a8a5e89aa312c6f5b12098d93 (patch) | |
tree | d07d8185e2a026f588146cf17e26648fc486222e /contrib/rvnit/sv/05Sconsole-setup | |
parent | 5f76e13946b91213cae66d423a90a27eda24dc1a (diff) | |
download | rvnit-07ba00058350948a8a5e89aa312c6f5b12098d93.tar.gz rvnit-07ba00058350948a8a5e89aa312c6f5b12098d93.tar.xz rvnit-07ba00058350948a8a5e89aa312c6f5b12098d93.zip |
add contrib
Diffstat (limited to 'contrib/rvnit/sv/05Sconsole-setup')
-rwxr-xr-x | contrib/rvnit/sv/05Sconsole-setup | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/contrib/rvnit/sv/05Sconsole-setup b/contrib/rvnit/sv/05Sconsole-setup new file mode 100755 index 0000000..966121b --- /dev/null +++ b/contrib/rvnit/sv/05Sconsole-setup @@ -0,0 +1,30 @@ +#!/bin/sh + +. /etc/runit/functions + +# vim: set ts=4 sw=4 et: + +[ -n "$VIRTUALIZATION" ] && return 0 + +TTYS=${TTYS:-12} +if [ -n "$FONT" ]; then + msg "Setting up TTYs font to '${FONT}'..." + + _index=0 + while [ ${_index} -le $TTYS ]; do + setfont ${FONT_MAP:+-m $FONT_MAP} ${FONT_UNIMAP:+-u $FONT_UNIMAP} \ + $FONT -C "/dev/tty${_index}" + _index=$((_index + 1)) + done +fi + +if [ -n "$KEYMAP" ]; then + msg "Setting up keymap to '${KEYMAP}'..." + loadkeys -q -u ${KEYMAP} +fi + +if [ -n "$HARDWARECLOCK" ]; then + msg "Setting up RTC to '${HARDWARECLOCK}'..." + TZ=$TIMEZONE hwclock --systz \ + ${HARDWARECLOCK:+--$(echo $HARDWARECLOCK |tr A-Z a-z) --noadjfile} || emergency_shell +fi |