updated on Wed Jan 25 08:34:36 UTC 2012
[aur-mirror.git] / firestarter-gtkstatusicon / 20-net-tools-ifconfig-format-change.patch
blob0037fbd035023eb488b53448a035c023a7d36218
1 --- firestarter-1.0.3/src/scriptwriter.c
2 +++ firestarter-1.0.3/src/scriptwriter.c
3 @@ -88,16 +88,16 @@
4 fprintf (f, "\n# --(Extract Network Information)--\n\n");
6 fprintf (f, "# External network interface data\n"
7 - "IP=`/sbin/ifconfig $IF | grep inet | cut -d : -f 2 | cut -d \\ -f 1`\n"
8 - "MASK=`/sbin/ifconfig $IF | grep Mas | cut -d : -f 4`\n"
9 - "BCAST=`/sbin/ifconfig $IF |grep Bcast: | cut -d : -f 3 | cut -d \\ -f 1`\n"
10 + "IP=`/sbin/ifconfig $IF | grep inet | tr -s ' ' | cut -d \\ -f 3`\n"
11 + "MASK=`/sbin/ifconfig $IF | grep netmask | tr -s ' ' | cut -d \\ -f 5`\n"
12 + "BCAST=`/sbin/ifconfig $IF | grep broadcast | tr -s ' ' | cut -d \\ -f 7`\n"
13 "NET=$IP/$MASK\n\n");
15 fprintf (f, "if [ \"$NAT\" = \"on\" ]; then\n"
16 " # Internal network interface data\n"
17 - " INIP=`/sbin/ifconfig $INIF | grep inet | cut -d : -f 2 | cut -d \\ -f 1`\n"
18 - " INMASK=`/sbin/ifconfig $INIF | grep Mas | cut -d : -f 4`\n"
19 - " INBCAST=`/sbin/ifconfig $INIF |grep Bcast: | cut -d : -f 3 | cut -d \\ -f 1`\n"
20 + " INIP=`/sbin/ifconfig $INIF | grep inet | tr -s ' ' | cut -d \\ -f 3`\n"
21 + " INMASK=`/sbin/ifconfig $INIF | grep netmask | tr -s ' ' | cut -d \\ -f 5`\n"
22 + " INBCAST=`/sbin/ifconfig $INIF | grep broadcast | tr -s ' ' | cut -d \\ -f 7`\n"
23 " INNET=$INIP/$INMASK\n"
24 "fi\n\n");