diff options
author | Seppo Jaakola <seppo.jaakola@codership.com> | 2013-02-05 17:54:42 +0200 |
---|---|---|
committer | Seppo Jaakola <seppo.jaakola@codership.com> | 2013-02-05 17:54:42 +0200 |
commit | 800fa186e3ab77ee93e75e929fe7917983e607e9 (patch) | |
tree | c5cc3e52e73f2469e5ef3f96249938699516d8df /sql/wsrep_utils.cc | |
parent | 9da9a242faf1fd7b2f45dc0561e5bf742a7be47b (diff) | |
download | mariadb-git-800fa186e3ab77ee93e75e929fe7917983e607e9.tar.gz |
merged with codership-mysql up to revision 3839
bzr merge -r3810..3839 lp:codership-mysql/5.5
Diffstat (limited to 'sql/wsrep_utils.cc')
-rw-r--r-- | sql/wsrep_utils.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/wsrep_utils.cc b/sql/wsrep_utils.cc index b1bd6de07cf..daba0e4cab2 100644 --- a/sql/wsrep_utils.cc +++ b/sql/wsrep_utils.cc @@ -354,8 +354,9 @@ size_t guess_ip (char* buf, size_t buf_len) // try to find the address of the first one #if (TARGET_OS_LINUX == 1) const char cmd[] = "/sbin/ifconfig | " - "grep -m1 -1 -E '^[a-z]?eth[0-9]' | tail -n 1 | " - "awk '{ print $2 }' | awk -F : '{ print $2 }'"; +// "grep -m1 -1 -E '^[a-z]?eth[0-9]' | tail -n 1 | " + "grep -E '^[[:space:]]+inet addr:' | grep -m1 -v 'inet addr:127' | " + "sed 's/:/ /' | awk '{ print $3 }'"; #elif defined(__sun__) const char cmd[] = "/sbin/ifconfig -a | " "/usr/gnu/bin/grep -m1 -1 -E 'net[0-9]:' | tail -n 1 | awk '{ print $2 }'"; |