GNOME Bugzilla – Bug 537082
Firestarter fails to run on locale other than English
Last modified: 2011-12-06 06:16:51 UTC
Please describe the problem: Firestarter fails to run on Ubuntu 8.04 when the locale is set to Spanish (but the problem can be generalized to any locale other than English). The problem is in the (generated) file /etc/firestarter/firestarter.sh. The following lines: IP=`/sbin/ifconfig $IF | grep inet | cut -d : -f 2 | cut -d \\ -f 1` MASK=`/sbin/ifconfig $IF | grep Mas | cut -d : -f 4` BCAST=`/sbin/ifconfig $IF |grep Bcast: | cut -d : -f 3 | cut -d \\ -f 1` fails when the locale is other than English, because they look up several keyword ("Mas", "Bcast:") which doesn't appears in ifconfig in Spanish. Example: ricardo@kadath:~$ LANG=C ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:18:f3:53:b2:9a inet addr:192.168.2.100 Bcast:192.168.2.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2736 errors:0 dropped:0 overruns:0 frame:0 TX packets:2634 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:2917432 (2.7 MB) TX bytes:368744 (360.1 KB) Interrupt:18 Base address:0xa000 ricardo@kadath:~$ ifconfig eth0 eth0 Link encap:Ethernet direcciónHW 00:18:f3:53:b2:9a inet dirección:192.168.2.100 Difusión:192.168.2.255 Máscara:255.255.255.0 ARRIBA DIFUSIÓN CORRIENDO MULTICAST MTU:1500 Metric:1 RX packets:2723 errors:0 dropped:0 overruns:0 frame:0 TX packets:2620 errors:0 dropped:0 overruns:0 carrier:0 colisiones:0 txqueuelen:1000 RX bytes:2908959 (2.7 MB) TX bytes:365950 (357.3 KB) Interrupción:18 Dirección base: 0xa000 As a workaround, you can hack the /etc/firestarter/firestarter.sh file, replacing the three above lines with the following: IP=`LANG=C /sbin/ifconfig $IF | grep inet | cut -d : -f 2 | cut -d \\ -f 1` MASK=`LANG=C /sbin/ifconfig $IF | grep Mas | cut -d : -f 4` BCAST=`LANG=C /sbin/ifconfig $IF |grep Bcast: | cut -d : -f 3 | cut -d \\ -f 1` A patch which resolves the issue follows: --- src/scriptwriter.c.old 2008-04-30 22:42:08.000000000 +0200 +++ src/scriptwriter.c 2008-04-30 22:44:23.000000000 +0200 @@ -88,9 +88,9 @@ fprintf (f, "\n# --(Extract Network Information)--\n\n"); fprintf (f, "# External network interface data\n" - "IP=`/sbin/ifconfig $IF | grep inet | cut -d : -f 2 | cut -d \\ -f 1`\n" - "MASK=`/sbin/ifconfig $IF | grep Mas | cut -d : -f 4`\n" - "BCAST=`/sbin/ifconfig $IF |grep Bcast: | cut -d : -f 3 | cut -d \\ -f 1`\n" + "IP=`LANG=C /sbin/ifconfig $IF | grep inet | cut -d : -f 2 | cut -d \\ -f 1`\n" + "MASK=`LANG=C /sbin/ifconfig $IF | grep Mas | cut -d : -f 4`\n" + "BCAST=`LANG=C /sbin/ifconfig $IF |grep Bcast: | cut -d : -f 3 | cut -d \\ -f 1`\n" "NET=$IP/$MASK\n\n"); fprintf (f, "if [ \"$NAT\" = \"on\" ]; then\n" Steps to reproduce: 1. Use Ubuntu 8.04 2. Set locale to Spanish 3. Install Firestarter and try to run it Actual results: Firestarter don't start properly and shows the following error message: "External network device eth0 is not ready. Aborting.." Expected results: Firesterter starts properly. Does this happen every time? Yes. Other information: Originally reported in Launchpad: https://bugs.edge.launchpad.net/ubuntu/+source/firestarter/+bug/222038
Created attachment 112303 [details] [review] Patch to resolve the issue This patch tries to resolve the issue, using the LANG=C prefix in the generated firestarter.sh file.
Bug #432141 is a duplicate of this one.
Bug #450051 is a duplicate of this one.
*** Bug 432141 has been marked as a duplicate of this bug. ***
*** Bug 450051 has been marked as a duplicate of this bug. ***
Ricardo: Thanks for the patch and mentioning the duplicates! Anyway, the last code commit to SVN has been more than 3 years ago, so I assume that this module is dead. :-/
(In reply to comment #6) > Ricardo: Thanks for the patch and mentioning the duplicates! > > Anyway, the last code commit to SVN has been more than 3 years ago, so I assume > that this module is dead. :-/ > Oh, it's a very sad situation, because Firestarter is often used as an easy firewall, as well as an Internet connection sharing solution... :(
Andre: can you apply the patch in the SVN code?
I could, but it is considered impolite to commit patches without a maintainer's OK. also, most distros pick up releases instead of svn checkouts.
Oh, ok, I understand. Then, how can we promote the patch at any maintainer's eyes? Thanks a lot.
Created attachment 133126 [details] [review] More complete patch for firestarter locale issue
The patch as originally provided by Ricardo is insufficient to fix this issue fully. I just helped get a more complete version of it into Ubuntu Jaunty 9.04. The patch file used is attached. I intend to get this patch accepted into Debian as well, before too much longer. How to get it "upstream" into the main source tree of firestarter, when firestarter seems more or less abandoned, is a different question -- I have no idea how to do that. Jonathan
firestarter development has been stalled and it has been unmaintained for a few years now. I contacted Tomas Junnonen (majix@iki.fi) because he is listed as Developer on project page but didn't get any response. I found firestarter on fedora wiki [1] under deprecated packages so i am closing all the bugs as WONTFIX. Please feel free to reopen the bugs in future if anyone takes the responsibility for active development. [1] http://fedoraproject.org/wiki/Deprecated_packages