+1
This commit is contained in:
@@ -97,7 +97,7 @@ collect_lxc_summary() {
|
||||
# Prefer iproute2 global IPv4 addresses
|
||||
ip -o -4 addr show up scope global 2>/dev/null | awk "{print \$4}" || true;
|
||||
# Fallbacks
|
||||
hostname -I 2>/dev/null || true;
|
||||
hostname -i 2>/dev/null || true;
|
||||
ip -4 addr 2>/dev/null | awk "/inet /{print \$2}" || true;
|
||||
ifconfig 2>/dev/null | awk "/inet (addr:)?/{print \$2}" | sed "s/^addr://" || true;
|
||||
ip route get 1 2>/dev/null | awk "{for(i=1;i<=NF;i++) if (\$i==\"src\") print \$(i+1)}" || true;
|
||||
|
||||
Reference in New Issue
Block a user