locale.sh 503 B

1234567891011121314
  1. #!/bin/sh
  2. # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
  3. # ex: ts=8 sw=4 sts=4 et filetype=sh
  4. # Regen locales if it's set in the kernel cmdline.
  5. type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
  6. LOCALE=$(getarg locale.LANG)
  7. [ -z "$LOCALE" ] && LOCALE="en_US.UTF-8"
  8. # Create new user and remove password. We'll use autologin by default.
  9. sed -e "s,^\#\($LOCALE.*\),\1," -i $NEWROOT/etc/default/libc-locales
  10. chroot $NEWROOT xbps-reconfigure -f glibc-locales >/dev/null 2>&1