mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-7143: cleanup configure_locale.sh code
This commit is contained in:
parent
aa14a619a6
commit
6a688a0337
@ -1,4 +1,14 @@
|
||||
fix_locale() {
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
function configure_locale() {
|
||||
grep LANG=en_US.UTF-8 /etc/default/locale && \
|
||||
grep LC_ALL=en_US.UTF-8 /etc/default/locale && \
|
||||
grep "en_US.UTF-8 UTF-8" /etc/locale.gen &&
|
||||
return
|
||||
|
||||
cat >> /etc/default/locale << EOF
|
||||
LANG=en_US.UTF-8
|
||||
LC_ALL=en_US.UTF-8
|
||||
@ -10,4 +20,4 @@ EOF
|
||||
locale-gen en_US.UTF-8
|
||||
}
|
||||
|
||||
fix_locale
|
||||
return 2>/dev/null || configure_locale
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user