ticket 1219: get INTERNAL_IP using env LANG=C and less strict grep. Patch by sebas891

This commit is contained in:
mlutfy 2010-01-15 00:08:25 +00:00
parent 1deeb6d899
commit 02eb088ae2
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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