mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-28 13:46:32 +00:00
/etc/init.d/S99showinfo: show all IP addresses on one line
This commit is contained in:
parent
3cefd197a2
commit
b0e0ba1521
@ -7,7 +7,8 @@ msg_info() {
|
||||
}
|
||||
|
||||
show_iface_ip_addr() {
|
||||
addr=$(ip addr show dev $1 2>/dev/null | grep inet | tr -s ' ' | sed -r 's/^\s+//' | cut -d ' ' -f 2)
|
||||
addr=$(ip addr show dev $1 2>/dev/null | grep inet | tr -s ' ' | sed -r 's/^\s+//' | \
|
||||
cut -d ' ' -f 2 | grep -iv fe80 | sed 'N;s/\n/, /')
|
||||
test -n "${addr}" && msg_info "Interface $1 has IP address ${addr}"
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user