Commit 0852cf5d authored by Anton Midyukov's avatar Anton Midyukov

rescue: cleanup all locales except C.UTF-8, set locale C.UTF-8

parent c16d990f
......@@ -6,7 +6,14 @@ if [ -s /etc/sysconfig/i18n ]; then exit 0; fi
mkdir -p /etc/sysconfig
cat >> /etc/sysconfig/i18n << _EOF_
# mkimage-profiles live 20-locale hook
SYSFONT=LatArCyrHeb-16
LANG=en_US.utf8
LANG=C.UTF-8
SUPPORTED=C.UTF-8
_EOF_
# set locale C.UTF-8 for root (needed for p10)
cat>/root/.i18n<<_EOF_
LANGUAGE=C.UTF-8
LANG=C.UTF-8
_EOF_
:
#!/bin/sh
# cleanup extra locales
CLEANUP_DIRS="/usr/lib/locale /usr/share/locale"
find /usr/lib/locale /usr/share/locale -mindepth 1 -maxdepth 1 \
-not -name 'C*' -exec rm -r {} \;
for CLEANUP_DIR in $CLEANUP_DIRS; do
cd "$CLEANUP_DIR"
rm -fr $(ls -1 |sed '/en_US/d' | tr -s '\r\n' ' ')
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment