From 22bae418bba36efece13ad8b124286774c579ad0 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 21 May 2013 21:44:45 +0200 Subject: dracut: new locale.sh script to rebuild the target locale. --- dracut/locale.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 dracut/locale.sh (limited to 'dracut/locale.sh') diff --git a/dracut/locale.sh b/dracut/locale.sh new file mode 100644 index 0000000..4225218 --- /dev/null +++ b/dracut/locale.sh @@ -0,0 +1,14 @@ +#!/bin/sh +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh + +# Regen locales if it's set in the kernel cmdline. + +type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh + +LOCALE=$(getarg locale.LANG) +[ -z "$LOCALE" ] && LOCALE="en_US.UTF-8" + +# Create new user and remove password. We'll use autologin by default. +sed -e "s,^\#\($LOCALE.*\),\1," -i $NEWROOT/etc/default/libc-locales +chroot $NEWROOT xbps-reconfigure -f glibc-locales >/dev/null 2>&1 -- cgit 1.4.1