From: Frank Brehm Date: Thu, 18 Jun 2020 14:50:39 +0000 (+0200) Subject: Bugfixing bin/create-motd.sh X-Git-Tag: 2.1.2^2~9^2~31^2~21 X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=ad58234273aacd05aa066ab36aabe58b5b44a32b;p=pixelpark%2Fcreate-vmware-tpl.git Bugfixing bin/create-motd.sh --- diff --git a/bin/create-motd.sh b/bin/create-motd.sh index d398457..ee4fa41 100755 --- a/bin/create-motd.sh +++ b/bin/create-motd.sh @@ -41,7 +41,7 @@ get_ip() { for iface in $( ip -oneline link show | grep '^[^ ]' | tail -n +2 | awk '{print $2}' | sed -e 's/:$//' ); do - IP=$( ip -oneline addr show dev eth0 | \ + IP=$( ip -oneline addr show dev "${iface}" | \ grep -P -o '\s+inet\s+(\S+)' | \ head -n 1 | \ sed -e 's/[ ]*inet[ ][ ]*//' -e 's|/.*||' )