profile: Set the default LANG var if it is unset

Normally it would be a gaffe to set this anywhere by default, since ssh clients
are configured by default to send LANG along to the servers. Unfortunately, to
support "mdt shell" properly, we have to do this, as the current stable version
of paramiko does not provide a facility to set environment variables, and thus
LANG ends up unset.

Change-Id: Ifba3e5c10465759b41af553b225fa5a6ad654f5f
diff --git a/debian/changelog b/debian/changelog
index eb81c12..4260bb9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@
 
   * set-datetime: Make timesyncd behave in the face of broken time
   * ssh: Disable password authentication
+  * profile: Set the LANG var based upon /etc/locale.conf if LANG is unset.
 
  -- Coral <coral-support@google.com>  Tue, 26 Feb 2019 11:32:18 -0800
 
diff --git a/etc/profile.d/default-lang.sh b/etc/profile.d/default-lang.sh
new file mode 100644
index 0000000..e2a6035
--- /dev/null
+++ b/etc/profile.d/default-lang.sh
@@ -0,0 +1,5 @@
+# Set the default LANG to something sensible if it is unset
+if [ -z "$LANG" ]; then
+    source /etc/locale.conf
+    export LANG
+fi