Package: firestarter / 1.0.3-11

21_locales_failing.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From: <hobbit@gandalf>
Subject: Use LANG=C to ensure C locale when grepping ifconfig output (Fixes LP:222038).

diff -urNad firestarter-1.0.3~/src/scriptwriter.c firestarter-1.0.3/src/scriptwriter.c
--- firestarter-1.0.3~/src/scriptwriter.c	2009-04-17 17:52:41.000000000 -0700
+++ firestarter-1.0.3/src/scriptwriter.c	2009-04-17 17:54:32.000000000 -0700
@@ -88,16 +88,16 @@
 	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"
 		    "	# Internal network interface data\n"
-		    "	INIP=`/sbin/ifconfig $INIF | grep inet | cut -d : -f 2 | cut -d \\  -f 1`\n"
-		    "	INMASK=`/sbin/ifconfig $INIF | grep Mas | cut -d : -f 4`\n"
-		    "	INBCAST=`/sbin/ifconfig $INIF |grep Bcast: | cut -d : -f 3 | cut -d \\  -f 1`\n"
+		    "	INIP=`LANG=C /sbin/ifconfig $INIF | grep inet | cut -d : -f 2 | cut -d \\  -f 1`\n"
+		    "	INMASK=`LANG=C /sbin/ifconfig $INIF | grep Mas | cut -d : -f 4`\n"
+		    "	INBCAST=`LANC=C /sbin/ifconfig $INIF |grep Bcast: | cut -d : -f 3 | cut -d \\  -f 1`\n"
 		    "	INNET=$INIP/$INMASK\n"
 		    "fi\n\n");