From 02eb088ae22163c3320962cdb4450ad2bba6b067 Mon Sep 17 00:00:00 2001 From: mlutfy <> Date: Fri, 15 Jan 2010 00:08:25 +0000 Subject: [PATCH] ticket 1219: get INTERNAL_IP using env LANG=C and less strict grep. Patch by sebas891 --- debian/alternc-slave.config | 2 +- debian/alternc.config | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/alternc-slave.config b/debian/alternc-slave.config index 5bd3c7ee..c230d90b 100644 --- a/debian/alternc-slave.config +++ b/debian/alternc-slave.config @@ -26,7 +26,7 @@ MYSQL_USER=sysusr MYSQL_PASS="`perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..10)' `" MYSQL_CLIENT=localhost FQDN="`cat /etc/mailname 2>/dev/null || hostname -f`" -INTERNAL_IP="`/sbin/ifconfig|grep "inet addr:" | grep -v 127.0.0.1| head -1 | sed -e 's/^.*addr:\([0-9\.]*\).*$/\1/' 2>/dev/null || hostname -f`" +INTERNAL_IP="`env LANG=C /sbin/ifconfig|grep inet | grep -v 127.0.0.1| head -1 | cut -d: -f2 | sed -e 's/\([0-9\.]*\).*$/\1/' 2>/dev/null || hostname -f`" PUBLIC_IP="$INTERNAL_IP" DEFAULT_MX="`cat /etc/mailname 2>/dev/null || hostname -f`" ALTERNC_LOC=/var/alternc diff --git a/debian/alternc.config b/debian/alternc.config index b2ef982c..0045622d 100644 --- a/debian/alternc.config +++ b/debian/alternc.config @@ -26,7 +26,7 @@ MYSQL_USER=sysusr MYSQL_PASS="`perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..10)' `" MYSQL_CLIENT=localhost FQDN="`cat /etc/mailname 2>/dev/null || hostname -f`" -INTERNAL_IP="`/sbin/ifconfig|grep "inet addr:" | grep -v 127.0.0.1| head -1 | sed -e 's/^.*addr:\([0-9\.]*\).*$/\1/' 2>/dev/null || hostname -f`" +INTERNAL_IP="`env LANG=C /sbin/ifconfig|grep inet | grep -v 127.0.0.1| head -1 | cut -d: -f2 | sed -e 's/\([0-9\.]*\).*$/\1/' 2>/dev/null || hostname -f`" PUBLIC_IP="$INTERNAL_IP" DEFAULT_MX="`cat /etc/mailname 2>/dev/null || hostname -f`" ALTERNC_LOC=/var/alternc