]> Frank Brehm's Git Trees - pixelpark/create-vmware-tpl.git/commitdiff
Bugfixing bin/create-motd.sh
authorFrank Brehm <frank.brehm@pixelpark.com>
Thu, 18 Jun 2020 14:50:39 +0000 (16:50 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Thu, 18 Jun 2020 14:50:39 +0000 (16:50 +0200)
bin/create-motd.sh

index d398457d313237ad44163cfc6182f3aa9e80bfcf..ee4fa41aa5e76e444962a7549ba1322b6ee0462e 100755 (executable)
@@ -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|/.*||' )