Forcing locale "C" to avoid grep ambiguities and locale bugs

This commit is contained in:
Thomas Schmitt 2019-12-08 19:39:09 +01:00
parent 157cb19092
commit 697c8cc1f9

View File

@ -5,6 +5,9 @@
# Thomas Schmitt <scdbackup@gmx.net>
# Provided under GPL version 2 or later.
export LANG=C
export LC_ALL=C
# Check whether we are on GNU/Linux
if uname -s | grep -v '^Linux' >/dev/null
then
@ -139,7 +142,7 @@ round_down_div_million() {
check_parameter() {
if test "$2" = "device_name"
then
if echo "$1" | grep '[^A-za-z0-9_/-]' >/dev/null
if echo "$1" | grep '[^A-Za-z0-9_/-]' >/dev/null
then
echo "SORRY: Given device name contains unexpected character. Ok: [A-za-z0-9_/-]" >&2
exit 12