[mrtg-developers] Exit code when the environment variable LANG is set to UTF-8

Vitezslav Crhonek vcrhonek at redhat.com
Tue Oct 7 14:40:32 CEST 2014


Hello,

$ echo $LANG
en_US.UTF-8
$ mrtg
-----------------------------------------------------------------------
ERROR: Mrtg will most likely not work properly when the environment
        variable LANG is set to UTF-8. Please run mrtg in an environment
        where this is not the case. Try the following command to start:

        env LANG=C /bin/mrtg
-----------------------------------------------------------------------
$ echo $?
0

The arguments doesn't matter, without LANG=C preceding the command, mrtg 
fails with this message and returns zero (success) exit code.
Even with nonsenses like:

$ mrtg 23fefsd
-----------------------------------------------------------------------
ERROR: Mrtg will most likely not work properly when the environment
        variable LANG is set to UTF-8. Please run mrtg in an environment
        where this is not the case. Try the following command to start:

        env LANG=C /bin/mrtg 23fefsd
-----------------------------------------------------------------------
$ echo $?
0

In my opinion this is not correct behaviour, would it be possible to 
change it to some non-zero value?

Best regards,
Vitezslav Crhonek



More information about the mrtg-developers mailing list