After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 537082 - Firestarter fails to run on locale other than English
Firestarter fails to run on locale other than English
Status: RESOLVED WONTFIX
Product: firestarter
Classification: Deprecated
Component: general
unspecified
Other All
: Normal blocker
: ---
Assigned To: Tomas Junnonen
Tomas Junnonen
gnome[unmaintained]
: 432141 450051 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-06-07 08:18 UTC by Ricardo Perez
Modified: 2011-12-06 06:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to resolve the issue (815 bytes, patch)
2008-06-07 08:22 UTC, Ricardo Perez
none Details | Review
More complete patch for firestarter locale issue (1.76 KB, patch)
2009-04-22 18:04 UTC, Jonathan Marsden
none Details | Review

Description Ricardo Perez 2008-06-07 08:18:53 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
Comment 1 Ricardo Perez 2008-06-07 08:22:08 UTC
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.
Comment 2 Ricardo Perez 2008-06-07 08:28:54 UTC
Bug #432141 is a duplicate of this one.
Comment 3 Ricardo Perez 2008-06-07 08:31:24 UTC
Bug #450051 is a duplicate of this one.
Comment 4 André Klapper 2008-06-10 19:10:39 UTC
*** Bug 432141 has been marked as a duplicate of this bug. ***
Comment 5 André Klapper 2008-06-10 19:11:00 UTC
*** Bug 450051 has been marked as a duplicate of this bug. ***
Comment 6 André Klapper 2008-06-10 19:11:36 UTC
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. :-/
Comment 7 Ricardo Perez 2008-06-11 22:23:35 UTC
(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... :(
Comment 8 Ricardo Perez 2008-06-17 12:25:32 UTC
Andre: can you apply the patch in the SVN code?
Comment 9 André Klapper 2008-06-17 14:22:20 UTC
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.
Comment 10 Ricardo Perez 2008-06-17 20:14:00 UTC
Oh, ok, I understand. Then, how can we promote the patch at any maintainer's eyes? Thanks a lot.
Comment 11 Jonathan Marsden 2009-04-22 18:04:09 UTC
Created attachment 133126 [details] [review]
More complete patch for firestarter locale issue
Comment 12 Jonathan Marsden 2009-04-22 18:06:12 UTC
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
Comment 13 Akhil Laddha 2011-12-06 06:16:51 UTC
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