Mailing List Archive

Compatibility with non-English versions of Linux
Hi folks,

I got this very interesting bug report from David Jules regarding heartbeat not
being compatible with multi-lingual versions of the underlying commands. Read
his report:
David JULES wrote:
>
> Hi,
>
> Perhaps I can try such to do such test program.
> It'll be usefull for me, because for the moment, my HA cluster dosen't work :(
>
> But I've found some "bugs"
>
> First, a little one with IPaddr
> I'm using Mandrake 6.0 in French, and the output of ifconfig is in french too
> Something like that:
>
> eth0 Lien encap:Ethernet HWaddr 00:50:04:4D:FA:1A
> inet adr:194.3.136.65 Bcast:194.3.136.255 Masque:255.255.255.0
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> Paquets Reçus:13062 erreurs:0 jetés:0 débordements:0 trames:0
> Paquets transmis:9955 erreurs:0 jetés:0 débordements:0 carrier:1
> collisions:98 lg file transmission:100
> Interruption:11 Adresse de base:0x1080
>
> and when IPaddr looking for "inet addr", it never match (in french ifconfig, "inet
> adr", with ONE d)
> I've modified IPaddr in 3 points, but I think it would be better to create a
> variable for that
>
> Or perhaps use ifconfig in English! :)
>
> But I think it would be nice to take care about translation

Is there a way I can set an environment variable or something that I can use to
tell the underlying commands to give me reports back in English?

This would be the simplest, and most general answer, since I wouldn't then have
to program the code to accept every answer from every command it invokes in
every language that any user might install on their machine.

Moreover, the problem (while complicated enough now) gets more complicated as
support is added for other operating systems (like FreeBSD), whose message
formats are a little different, and whose multilingual answers can be expected
to also be a little different.

This is complex in three dimensions, unless I keep to English answers from the
commands (commands x languages x operating-systems).

Can someone tell me how to do this?


-- Alan Robertson
alanr@bell-labs.com
Re: Compatibility with non-English versions of Linux [ In reply to ]
I've posted a fix on the mailing list (linux-ha@muc.de)
but doesn't work so well

I think the best is to add this at the beginning of IPaddr :
export LC_ALL=en

David.
Re: Compatibility with non-English versions of Linux [ In reply to ]
David JULES wrote:
>
> I've posted a fix on the mailing list (linux-ha@muc.de)
> but doesn't work so well
>
> I think the best is to add this at the beginning of IPaddr :
> export LC_ALL=en
>
> David.

Done. Your suggested change is now in CVS. David: You might give it a shot and
see how it works in your environment.

Thanks!

-- Alan Robertson
alanr@bell-labs.com