Phillip Scholz
2008-Mar-26 09:07 UTC
[Puppet Users] facter Problem on Debian Etch - German i18n
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I got problems with facter on one of our systems which has german language set. Facter could not get the IP address of its network interfaces. To get it working I had to change some lines. In ipmess.rb I changed lines 32-33 to: tmp1 = $1 if s =~ /inet Adresse:([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/ tmp2 = $1 if s =~ /(?:Ethernet|Hardware Adresse) (\w{1,2}:\w{1,2}:\w{1,2}:\w{1,2}:\w{1,2}:\w{1,2})/ But I could not fix it at facter.rb - has someone of you done this before? Perhaps even without breaking compatibility with other versions? Regards, Phillip -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFH6hJl1MyrzuZeshoRAqhsAJ47wPWa8FBUXv8aOHTVmcBcHkedXACffCrc shCxF4JFz7Axk4Z/BARlLxI=sE+P -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Phillip Scholz
2008-Mar-26 09:17 UTC
[Puppet Users] Re: facter Problem on Debian Etch - German i18n
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ok, I fixed it by changing the system back to english l10n ... for anyone that searches for the same feature: dpkg-reconfigure -p low locales Bye Phillip Scholz schrieb:> Hi, > > I got problems with facter on one of our systems which has german > language set. > Facter could not get the IP address of its network interfaces. To get it > working I had to change some lines. > > In ipmess.rb I changed lines 32-33 to: > tmp1 = $1 if s =~ /inet Adresse:([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/ > tmp2 = $1 if s =~ /(?:Ethernet|Hardware Adresse) > (\w{1,2}:\w{1,2}:\w{1,2}:\w{1,2}:\w{1,2}:\w{1,2})/ > > But I could not fix it at facter.rb - has someone of you done this > before? Perhaps even without breaking compatibility with other versions? > > Regards, > Phillip-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFH6hSs1MyrzuZeshoRAjGSAJ4iRtuRuKjUlu3a9aGTp5yXVj0EBwCeO5dn dxicUYawuhtdtbn0E4L3T/o=twL9 -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
James Turnbull
2008-Mar-26 09:24 UTC
[Puppet Users] Re: facter Problem on Debian Etch - German i18n
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Phillip Scholz wrote: | Hi, | | I got problems with facter on one of our systems which has german | language set. | Facter could not get the IP address of its network interfaces. To get it | working I had to change some lines. | | In ipmess.rb I changed lines 32-33 to: | tmp1 = $1 if s =~ /inet Adresse:([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/ | tmp2 = $1 if s =~ /(?:Ethernet|Hardware Adresse) | (\w{1,2}:\w{1,2}:\w{1,2}:\w{1,2}:\w{1,2}:\w{1,2})/ | | But I could not fix it at facter.rb - has someone of you done this | before? Perhaps even without breaking compatibility with other versions? Phillip Currently Facter''s regexes do not support non-English language sets. It''s an interesting thought though. What exactly do you mean you could not fix it facter.rb? Regards James Turnbull - -- James Turnbull (james@lovedthanlost.net) - -- Author of: - - Pulling Strings with Puppet (http://www.amazon.com/gp/product/1590599780/) - - Pro Nagios 2.0 (http://www.amazon.com/gp/product/1590596099/) - - Hardening Linux (http://www.amazon.com/gp/product/1590594444/) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFH6hY09hTGvAxC30ARAme8AJ0cH7OX5qx36D/UA7dxCZ0r3QCmmACgioyO BxfjF71x3Ukh57+MUxdBjpo=zovF -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
David Schmitt
2008-Mar-26 09:31 UTC
[Puppet Users] Re: facter Problem on Debian Etch - German i18n
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wednesday 26 March 2008, Phillip Scholz wrote:> Ok, I fixed it by changing the system back to english l10n ... for > anyone that searches for the same feature: > > dpkg-reconfigure -p low localesThe same can be done by running facter with "LOCALE=C" set in the environment. This should probably be default for all commands run from facter (and puppet) anyways. Regards, DavidS - -- The primary freedom of open source is not the freedom from cost, but the free- dom to shape software to do what you want. This freedom is /never/ exercised without cost, but is available /at all/ only by accepting the very different costs associated with open source, costs not in money, but in time and effort. - -- http://www.schierer.org/~luke/log/20070710-1129/on-forks-and-forking -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFH6hf8/Pp1N6Uzh0URAgI8AJ4k+32ThibsTCHeTVyUPg4YHRNaZQCdGXmN mkxXyUbNreu/pAet2MUGNqc=Y8Kw -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Phillip Scholz
2008-Mar-26 10:06 UTC
[Puppet Users] Re: facter Problem on Debian Etch - German i18n
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Well ... I''m just not good enough in speaking ruby ;-) But I guess someone at this list is good enough to do this. The german output of ifconfig looks like this: eth0 Protokoll:Ethernet Hardware Adresse <%= mac_address %> inet Adresse:<%= ipaddress %> Bcast:<%= broadcast %> Maske:<%= netmask %> inet6 Adresse: <%= ipv6address %>/64 Gültigkeitsbereich:Verbindung UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:594116445 errors:0 dropped:0 overruns:0 frame:0 TX packets:586913698 errors:0 dropped:0 overruns:0 carrier:0 Kollisionen:0 Sendewarteschlangenlänge:1000 RX bytes:497375940 (474.3 MiB) TX bytes:2828143106 (2.6 GiB) Basisadresse:0x2000 Speicher:da300000-da320000 lo Protokoll:Lokale Schleife inet Adresse:127.0.0.1 Maske:255.0.0.0 inet6 Adresse: ::1/128 Gültigkeitsbereich:Maschine UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:3019022 errors:0 dropped:0 overruns:0 frame:0 TX packets:3019022 errors:0 dropped:0 overruns:0 carrier:0 Kollisionen:0 Sendewarteschlangenlänge:0 RX bytes:1784111801 (1.6 GiB) TX bytes:1784111801 (1.6 GiB) Well and while someone is on this case to improve facters IP handling he/she perhaps can include virtual interfaces (i.e. eth0:0 , lo:5) ? Regards, Phillip James Turnbull schrieb:> Phillip Scholz wrote: > | Hi, > | > | I got problems with facter on one of our systems which has german > | language set. > | Facter could not get the IP address of its network interfaces. To get it > | working I had to change some lines. > | > | In ipmess.rb I changed lines 32-33 to: > | tmp1 = $1 if s =~ /inet Adresse:([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/ > | tmp2 = $1 if s =~ /(?:Ethernet|Hardware Adresse) > | (\w{1,2}:\w{1,2}:\w{1,2}:\w{1,2}:\w{1,2}:\w{1,2})/ > | > | But I could not fix it at facter.rb - has someone of you done this > | before? Perhaps even without breaking compatibility with other versions? > > Phillip > > Currently Facter''s regexes do not support non-English language sets. > It''s an interesting thought though. > > What exactly do you mean you could not fix it facter.rb? > > Regards > > James Turnbull >- - -- Phillip Scholz Systems Administrator IT Freemail Karlsruhe 1&1 Internet AG Brauerstraße 48 D-76135 Karlsruhe Tel. +49-721-91374-4818 phillip.scholz@1und1.de http://www.1und1.de/ Amtsgericht Montabaur HRB 6484 Vorstand: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Andreas Gauger, Thomas Gottschlich, Matthias Greve, Robert Hoffmann, Markus Huhn, Achim Weiss Aufsichtsratsvorsitzender: Michael Scheeren -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFH6iA31MyrzuZeshoRAtOIAJ4uIe0bjXbr5peIhO6nFmpVTlODJgCfRyKB f/z2TyOAOkU7v1ApCnukLyE=J+CB -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Marcin Owsiany
2008-Mar-26 10:50 UTC
[Puppet Users] Re: facter Problem on Debian Etch - German i18n
On Wed, Mar 26, 2008 at 10:31:37AM +0100, David Schmitt wrote:> > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Wednesday 26 March 2008, Phillip Scholz wrote: > > Ok, I fixed it by changing the system back to english l10n ... for > > anyone that searches for the same feature: > > > > dpkg-reconfigure -p low locales > > The same can be done by running facter with "LOCALE=C" set in the environment. > This should probably be default for all commands run from facter (and puppet) > anyways.If facter does not set LANG to POSIX before running commands whose output it parses, then it''s a bug. -- Marcin Owsiany Web Systems Integrator - Guardian Unlimited ------------------------------------------------------------------ Visit Guardian Unlimited - the UK''s most popular newspaper website http://guardian.co.uk http://observer.co.uk ------------------------------------------------------------------ The Newspaper Marketing Agency Opening Up Newspapers http://www.nmauk.co.uk ------------------------------------------------------------------ Please consider the environment before printing this email This e-mail and all attachments are confidential and may also be privileged. If you are not the named recipient, please notify the sender and delete the e-mail and all attachments immediately. Do not disclose the contents to another person. You may not use the information for any purpose, or store, or copy, it in any way. Guardian News & Media Limited is not liable for any computer viruses or other material transmitted with or as part of this e-mail. You should employ virus checking software. Guardian News & Media Limited A member of Guardian Media Group PLC Registered Office Number 1 Scott Place, Manchester M3 3GG Registered in England Number 908396 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
James Turnbull
2008-Mar-26 12:09 UTC
[Puppet Users] Re: facter Problem on Debian Etch - German i18n
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Phillip Scholz wrote: | But I guess someone at this list is good enough to do this. | The german output of ifconfig looks like this: | | eth0 Protokoll:Ethernet Hardware Adresse <%= mac_address %> | inet Adresse:<%= ipaddress %> Bcast:<%= broadcast %> | Maske:<%= netmask %> | inet6 Adresse: <%= ipv6address %>/64 | Gültigkeitsbereich:Verbindung | UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 | RX packets:594116445 errors:0 dropped:0 overruns:0 frame:0 | TX packets:586913698 errors:0 dropped:0 overruns:0 carrier:0 | Kollisionen:0 Sendewarteschlangenlänge:1000 | RX bytes:497375940 (474.3 MiB) TX bytes:2828143106 (2.6 GiB) | Basisadresse:0x2000 Speicher:da300000-da320000 | | lo Protokoll:Lokale Schleife | inet Adresse:127.0.0.1 Maske:255.0.0.0 | inet6 Adresse: ::1/128 Gültigkeitsbereich:Maschine | UP LOOPBACK RUNNING MTU:16436 Metric:1 | RX packets:3019022 errors:0 dropped:0 overruns:0 frame:0 | TX packets:3019022 errors:0 dropped:0 overruns:0 carrier:0 | Kollisionen:0 Sendewarteschlangenlänge:0 | RX bytes:1784111801 (1.6 GiB) TX bytes:1784111801 (1.6 GiB) Hmmm tricky about how to do this - Facter relies heavily on parsed output - you''d perhaps need to "translate" all its regexs to other languages to get this to work. Please log a ticket at the Facter trac. | Well and while someone is on this case to improve facters IP handling | he/she perhaps can include virtual interfaces (i.e. eth0:0 , lo:5) ? | This is available in the Facter HEAD now and will be standard in the next release. Regards James Turnbull - -- James Turnbull (james@lovedthanlost.net) - -- Author of: - - Pulling Strings with Puppet (http://www.amazon.com/gp/product/1590599780/) - - Pro Nagios 2.0 (http://www.amazon.com/gp/product/1590596099/) - - Hardening Linux (http://www.amazon.com/gp/product/1590594444/) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFH6j0V9hTGvAxC30ARAjU/AJoCXMZyDQfOTRSXH3zLRx4NF+bR7ACfbalq dKHSw4hx58jQxnzsDZDc0Kg=fMKr -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Thomas Bellman
2008-Mar-26 13:25 UTC
[Puppet Users] Re: facter Problem on Debian Etch - German i18n
Marcin Owsiany wrote:> If facter does not set LANG to POSIX before running commands whose > output it parses, then it''s a bug.You should probably set LC_ALL. Or make sure to unset all LC_* environment variables. (LC_MESSAGES, LC_NUMERIC, and so on, override LANG. And LC_ALL override all other LC_* variables.) /Thomas Bellman <bellman@nsc.liu.se> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---