Check if LANG is set in configure.sh

💪 Now available

Tried configuring dbmarlin on a RHEL7.9 box. It took some time to figure out why it did not succeed, but configure passes $LANG down to postgres lc_messages. When LANG is not set, havoc awaits;-). A simple test in configure would avoid that:

<pre>
if (( $EUID == 0 )); then
"Please don't run as root. We recommend you create a dbmarlin user."
exit
fi

  • LANG=$(locale | grep "LANG")
  • if [ -n ${LANG} ]; then
  • echo "Please set LANG, i.e. export LANG=<your choise>";
  • exit 1;
  • fi

DIR="$(cd "$(dirname "$0")" && pwd)"
</pre>

Lennart Jonsson

2 years ago

Activity
Mick Mcguinness changed status to 💪 Now available

1 year ago

Mick Mcguinness

This was added in from DBmarlin v2.11 and later.

0    1 year ago    Reply

Comment must be at least 20 characters.
Cancel
Mick Mcguinness changed status to 🛠 Planned

2 years ago

Mick Mcguinness

Thanks, Lennart we will get that change included in an upcoming release.

The only time I have seen LANG not set previously was for customers deploying to Docker and they needed to set ENV LANG en_US.UTF-8 for example in their Dockerfile.

0    2 years ago    Reply

Comment must be at least 20 characters.
Cancel
Lennart Jonsson

Might just be in our setup, but I see it for all our RHEL7.9 boxes. RHEL8.7 and above seems to have LANG set

0    2 years ago    Reply

Comment must be at least 20 characters.
Cancel
Mick Mcguinness

@Lennart Jonsson:

We have RHEL 7.9 as one of our test environments and on ours, LANG is set. Not sure why we have it and yours doesn't but in any case, we will add the check in configure.sh as you suggested.

0    2 years ago    Reply

Comment must be at least 20 characters.
Cancel
Categories
Bug