diff options
author | Juan RP <xtraeme@gmail.com> | 2013-05-21 21:44:45 +0200 |
---|---|---|
committer | Juan RP <xtraeme@gmail.com> | 2013-05-21 21:44:45 +0200 |
commit | 22bae418bba36efece13ad8b124286774c579ad0 (patch) | |
tree | b2ef390c334e022f7d7d9bac736f13f215c5a330 /dracut/locale.sh | |
parent | e05ce506e8824aa09809e88bd9104858faf64ce4 (diff) | |
download | hrmpf-22bae418bba36efece13ad8b124286774c579ad0.tar.gz hrmpf-22bae418bba36efece13ad8b124286774c579ad0.tar.xz hrmpf-22bae418bba36efece13ad8b124286774c579ad0.zip |
dracut: new locale.sh script to rebuild the target locale.
Diffstat (limited to 'dracut/locale.sh')
-rw-r--r-- | dracut/locale.sh | 14 |
1 files changed, 14 insertions, 0 deletions
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 |