fedora: fix default locale generation

If /etc/locale/conf contains LANG="en_US.UTF-8" (with quotes), it was
improperly parsed.
This commit is contained in:
Marek Marczykowski-Górecki 2015-08-04 17:17:54 +02:00
parent 1ca8b51c03
commit e9e38c04a2
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -273,7 +273,7 @@ if [ ! -e /etc/locale.conf ] || ! grep -q LANG /etc/locale.conf; then
echo "LANG=en_US.UTF-8" >> /etc/locale.conf echo "LANG=en_US.UTF-8" >> /etc/locale.conf
fi fi
# ... and make sure it is really generated # ... and make sure it is really generated
current_locale=`grep LANG /etc/locale.conf|cut -f 2 -d =` current_locale=`grep LANG /etc/locale.conf|cut -f 2 -d = | tr -d '"'`
if [ -n "$current_locale" ] && ! locale -a | grep -q "$current_locale"; then if [ -n "$current_locale" ] && ! locale -a | grep -q "$current_locale"; then
base=`echo "$current_locale" | cut -f 1 -d .` base=`echo "$current_locale" | cut -f 1 -d .`
charmap=`echo "$current_locale.UTF-8" | cut -f 2 -d .` charmap=`echo "$current_locale.UTF-8" | cut -f 2 -d .`