fix: set default language back to EN

closes #87

setting locale.conf is not enough to enforce a default lang in the greeter
anymore. for this /etc/environment is set which also get auto updated
by the fwul-session script

Change-Id: Ie11eeda9fd449772657678f679f3e64ddde334b0
parent 35f0214f
......@@ -18,13 +18,19 @@ SETLAYOUT="$(echo $LANG | cut -d '@' -f 1 | cut -d '.' -f 1 | cut -d '_' -f 1)"
setxkbmap -layout $SETLAYOUT
# set global locale
DMLANG=$(cat "$LANGFILE" | grep ^Language= | cut -d '=' -f 2)
echo "LANG=$DMLANG" > /tmp/locale.conf
# set global system locale
DMLANG=$(cat "$LANGFILE" | grep ^Language= | cut -d '=' -f 2 | sed 's/utf8/UTF-8/')
echo "LANG=\"$DMLANG\"" > /tmp/locale.conf
# set fallback language
echo "LANGUAGE=en_US.utf8" >> /tmp/locale.conf
echo "LANGUAGE=\"en_US.UTF-8\"" >> /tmp/locale.conf
sudo mv /tmp/locale.conf /etc/locale.conf
# ensure PAM locale is set, see issue #88.
# This also fixes an issue where the language does not change in the greeter top right after logging out
grep -v "LANG=" /etc/environment > /tmp/environment
echo "LANG=\"$DMLANG\"" >> /tmp/environment
sudo mv /tmp/environment /etc/environment
# detect FWUL mode
grep -v "fwul_" /etc/fwul-release > /tmp/fwul-release
hostnamectl status |grep -v ID |tr -d " " | tr ":" "=" |sed 's/^/fwul_/g' >> /tmp/fwul-release
......@@ -781,6 +781,7 @@ cat > $RSUDOERS <<EOSUDOERS
%wheel ALL=(ALL) NOPASSWD: /bin/umount -l /tmp
%wheel ALL=(ALL) NOPASSWD: /bin/mv /var/tmp/* /tmp/
%wheel ALL=(ALL) NOPASSWD: /bin/mv /tmp/locale.conf /etc/locale.conf
%wheel ALL=(ALL) NOPASSWD: /bin/mv /tmp/environment /etc/environment
# let the user sync the databases without asking for pw
%wheel ALL=(ALL) NOPASSWD: /usr/bin/trizen --noconfirm -Sy
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment