-
Notifications
You must be signed in to change notification settings - Fork 65
/
treecompose-post.sh
executable file
·74 lines (66 loc) · 1.18 KB
/
treecompose-post.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/usr/bin/env bash
set -e
# Persistent journal by default, because Atomic doesn't have syslog
echo 'Storage=persistent' >> /etc/systemd/journald.conf
# The loops below are too spammy otherwise...
set +x
# See: https://bugzilla.redhat.com/show_bug.cgi?id=1051816
# and: https://bugzilla.redhat.com/show_bug.cgi?id=1186757
# Keep this in sync with the `install-langs` in the treefile JSON
KEEPLANGS="
pt_BR
fr
fr_FR
de
de_DE
it
it_IT
ru
ru_RU
es
es_ES
en_US
zh_CN
ja
ja_JP
ko
ko_KR
zh_TW
as
as_IN
bn
bn_IN
gu
gu_IN
hi
hi_IN
kn
kn_IN
ml
ml_IN
mr
mr_IN
or
or_IN
pa
pa_IN
ta
ta_IN
te
te_IN
"
# Filter out locales from glibc which aren't UTF-8 and in the above set.
# TODO: https://github.com/projectatomic/rpm-ostree/issues/526
localedef --list-archive | while read locale; do
lang=${locale%%.*}
lang=${lang%%@*}
if [[ $locale != *.utf8 ]] || ! grep -q "$lang" <<< "$KEEPLANGS"; then
localedef --delete-from-archive "$locale"
fi
done
set -x
cp -f /usr/lib/locale/locale-archive /usr/lib/locale/locale-archive.tmpl
build-locale-archive
# Disable firewalld - we include it but don't want it enabled by default
# See https://pagure.io/atomic-wg/issue/372
systemctl disable firewalld