diff options
author | chinarulezzz <s.alex08@mail.ru> | 2016-05-25 21:38:57 +0300 |
---|---|---|
committer | Juan RP <xtraeme@gmail.com> | 2016-05-25 20:38:57 +0200 |
commit | c04b1488a1b88b2700e231203a210a7dc25a09fa (patch) | |
tree | e30e77fdad9e47eb72afdc714629c88b4b868b02 /core-services/03-console-setup.sh | |
parent | ab7f9c1f98d63c9e39008a8a2ab138093c82ce12 (diff) | |
download | runit-void-c04b1488a1b88b2700e231203a210a7dc25a09fa.tar.gz runit-void-c04b1488a1b88b2700e231203a210a7dc25a09fa.tar.xz runit-void-c04b1488a1b88b2700e231203a210a7dc25a09fa.zip |
fix the broken font setting (#47) 20160525
Diffstat (limited to 'core-services/03-console-setup.sh')
-rw-r--r-- | core-services/03-console-setup.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/core-services/03-console-setup.sh b/core-services/03-console-setup.sh new file mode 100644 index 0000000..5c8d468 --- /dev/null +++ b/core-services/03-console-setup.sh @@ -0,0 +1,26 @@ +# 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 |