New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-English locale in Arch Linux #1970

Closed
MaxMatti opened this Issue Jul 31, 2018 · 4 comments

Comments

2 participants
@MaxMatti
Contributor

MaxMatti commented Jul 31, 2018

Describe the bug
When I run ./rustserver start it displays the following error message:

[ .... ] Starting rustserver: RustWarning! Arch Linux dependency checking unavailable
[ WARN ] Starting rustserver: Default RCON Password detected!
 * Having CHANGE_ME as a password is not very safe.
[ INFO ] Starting rustserver: Check IP: 192.168.148.47
/home/max/Downloads/LinuxGSM-180718.2/lgsm/functions/check_system_requirements.sh: Zeile 37: [: : Ganzzahliger Ausdruck erwartet.
[  OK  ] Starting rustserver: Rust

I don't know if this is a serious issue, but it's an error message that prohibits the rest of the script from running. The error message is in german, because my locale is de_DE. I tried using en_US as a locale to generate the error message but then it doesn't appear. This is due to this line because the command free -m has a different output depending on the locale:

$ LANG=en_US free -m
              total        used        free      shared  buff/cache   available
Mem:          15987       10988         985         284        4013        5434
Swap:         11867          72       11795
$ LANG=de_DE free -m
              gesamt       benutzt     frei      gemns.  Puffer/Cache verfügbar
Speicher:       15987       10951        1020         284        4015        5472
Swap:         11867          72       11795

Instead you could use:

$ echo "$(($(grep MemTotal /proc/meminfo | awk '{print $2}')/1024))"
15987

which works under german as well as english and should work under every distro.

To Reproduce
Steps to reproduce the behaviour:

$ ./rustserver install && LANG=de_DE ./rustserver start

Expected behaviour
Less error messages.

@dgibbs64

This comment has been minimized.

Member

dgibbs64 commented Jul 31, 2018

Thanks for this!

@MaxMatti

This comment has been minimized.

Contributor

MaxMatti commented Jul 31, 2018

Should I create a pull-request for this? I'm not sure which other calls to free should be replaced and what exactly to replace them with, but I can look it up if you're unfamiliar with it.

@dgibbs64

This comment has been minimized.

Member

dgibbs64 commented Jul 31, 2018

Yeah feel free to creat a pull request. It might be worth replacing free all together as long as it gives the same output. That will guarantee the issue won't occur. Thanks for your help!

@MaxMatti

This comment has been minimized.

Contributor

MaxMatti commented Jul 31, 2018

see #1971 - unfortunately I didn't find a way that is supported by debian jessie or older.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment