From ad58234273aacd05aa066ab36aabe58b5b44a32b Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Thu, 18 Jun 2020 16:50:39 +0200 Subject: [PATCH] Bugfixing bin/create-motd.sh --- bin/create-motd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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|/.*||' ) -- 2.39.5