mirror of
https://github.com/MariaDB/server.git
synced 2026-04-26 10:15:29 +02:00
Merged patch for lp:1167368 from maria-5.5-galera.
This commit is contained in:
parent
3bb02f3e6d
commit
e51e5e940c
1 changed files with 2 additions and 4 deletions
|
|
@ -407,10 +407,8 @@ size_t wsrep_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 | "
|
||||
"grep -E '^[[:space:]]+inet addr:' | grep -m1 -v 'inet addr:127' | "
|
||||
"sed 's/:/ /' | awk '{ print $3 }'";
|
||||
const char cmd[] = "ip addr show | grep -E '^[[:space:]]*inet' | grep -m1 global |"
|
||||
" awk '{ print $2 }' | sed -e 's/\\/.*//'";
|
||||
#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 }'";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue