1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
#! /bin/bash
# (c) Michael Goetze, 2011, mgoetze@mgoetze.net
error=0 ; trap "error=$((error|1))" ERR
cat > $target/etc/sysconfig/clock <<-EOF
UTC=$UTC
ZONE=$TIMEZONE
EOF
cat > $target/etc/sysconfig/i18n <<-EOF
LANG="$DEFAULTLOCALE"
SUPPORTED="$SUPPORTEDLOCALE"
SYSFONT="$CONSOLEFONT"
EOF
cat > $target/etc/sysconfig/keyboard <<-EOF
KEYBOARDTYPE="pc"
KEYTABLE="$KEYMAP"
EOF
# can not be used, because we still not use systemd in FAI
# $ROOTCMD localectl set-locale LANG=$DEFAULTLOCALE
cat > $target/etc/locale.conf <<-EOF
LANG="$DEFAULTLOCALE"
EOF
if [ -f $target/usr/lib/locale/locale-archive.tmpl \
-a ! -s $target/usr/lib/locale/locale-archive ]; then
mv $target/usr/lib/locale/locale-archive.tmpl $target/usr/lib/locale/locale-archive
fi
fcopy -iv /etc/sysconfig/i18n /etc/sysconfig/keyboard
exit $error
|