--- /dev/null
+#! /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
+