summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStephane Desneux <stephane.desneux@open.eurogiciel.org>2014-03-21 12:46:26 +0100
committerStephane Desneux <stephane.desneux@open.eurogiciel.org>2014-03-21 12:46:26 +0100
commit526e0d7b508f87cb6c941a33df16fbebfe14fe9c (patch)
tree67a9a2a0355c630d8e313985ca2319587797578e /scripts
parentd3d48fbbf57fb930b6ca47fc5b018679fcbba42f (diff)
downloadmeta-526e0d7b508f87cb6c941a33df16fbebfe14fe9c.tar.gz
meta-526e0d7b508f87cb6c941a33df16fbebfe14fe9c.tar.bz2
meta-526e0d7b508f87cb6c941a33df16fbebfe14fe9c.zip
workaround to generate /etc/locale.conf correctly
MIC generates /etc/sysconfig/i18n but systemd expects /etc/locale.conf Change-Id: I9c9dce078eba82172c4790f9ab0912e612841064 Bug-Tizen: DEVT-160 Signed-off-by: Stephane Desneux <stephane.desneux@open.eurogiciel.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/generic-base.post32
1 files changed, 32 insertions, 0 deletions
diff --git a/scripts/generic-base.post b/scripts/generic-base.post
index d4c3635..ce66530 100644
--- a/scripts/generic-base.post
+++ b/scripts/generic-base.post
@@ -23,4 +23,36 @@ chown -R app:app /opt/home/app
# home dir must have the same label
chsmack -a User /opt/home/app
+# bug workaround on MIC (DEVT-160)
+if [ -e /etc/sysconfig/i18n -a ! -e /etc/locale.conf ]; then
+ unset LANG
+ unset LC_CTYPE
+ unset LC_NUMERIC
+ unset LC_TIME
+ unset LC_COLLATE
+ unset LC_MONETARY
+ unset LC_MESSAGES
+ unset LC_PAPER
+ unset LC_NAME
+ unset LC_ADDRESS
+ unset LC_TELEPHONE
+ unset LC_MEASUREMENT
+ unset LC_IDENTIFICATION
+ . /etc/sysconfig/i18n
+ rm -f /etc/sysconfig/i18n
+ [ -n "$LANG" ] && echo LANG=$LANG > /etc/locale.conf
+ [ -n "$LC_CTYPE" ] && echo LC_CTYPE=$LC_CTYPE >> /etc/locale.conf
+ [ -n "$LC_NUMERIC" ] && echo LC_NUMERIC=$LC_NUMERIC >> /etc/locale.conf
+ [ -n "$LC_TIME" ] && echo LC_TIME=$LC_TIME >> /etc/locale.conf
+ [ -n "$LC_COLLATE" ] && echo LC_COLLATE=$LC_COLLATE >> /etc/locale.conf
+ [ -n "$LC_MONETARY" ] && echo LC_MONETARY=$LC_MONETARY >> /etc/locale.conf
+ [ -n "$LC_MESSAGES" ] && echo LC_MESSAGES=$LC_MESSAGES >> /etc/locale.conf
+ [ -n "$LC_PAPER" ] && echo LC_PAPER=$LC_PAPER >> /etc/locale.conf
+ [ -n "$LC_NAME" ] && echo LC_NAME=$LC_NAME >> /etc/locale.conf
+ [ -n "$LC_ADDRESS" ] && echo LC_ADDRESS=$LC_ADDRESS >> /etc/locale.conf
+ [ -n "$LC_TELEPHONE" ] && echo LC_TELEPHONE=$LC_TELEPHONE >> /etc/locale.conf
+ [ -n "$LC_MEASUREMENT" ] && echo LC_MEASUREMENT=$LC_MEASUREMENT >> /etc/locale.conf
+ [ -n "$LC_IDENTIFICATION" ] && echo LC_IDENTIFICATION=$LC_IDENTIFICATION >> /etc/locale.conf
+fi
+