postplug/postplug.d/50console

17 lines
447 B
Bash

#!/bin/bash
# console - virtual consoles plugin for postplug
# Copyright (c) 2012-2014 by Silvan Calarco <silvan.calarco@mambasoft.it>
grep "^KEYMAP=" /etc/vconsole.conf >/dev/null || {
KEYMAP="${LANG:0:2}"
echo "KEYMAP=$KEYMAP" >> /etc/vconsole.conf
}
grep "^LANG=C$" /etc/locale.conf >/dev/null && \
sed -i "/^LANG=$/d" /etc/locale.conf
grep "^LANG=" /etc/locale.conf >/dev/null || \
echo "LANG=$LANG" >> /etc/locale.conf
exit 0