Skip to content

Commit

Permalink
better regex that does not match an IP on the loopback device lo
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrfai committed Jul 9, 2020
1 parent 2b15639 commit 493679e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/fai-make-nfsroot
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ add_etc_hosts_entries() {
ainsl $v $NFSROOT/etc/hosts "$NFSROOT_ETC_HOSTS"

# add entries for all network devices
local ips=$(ip addr show up| grep -P -o '(?<=inet )[^/]+' | grep -v 127.0.0.1)
local ips=$(ip -br ad show up| awk '/UP / {if ($3) print $3}' |sed -e 's#\/[0-9]\+##g')

local line
for eth in $ips; do
Expand Down

0 comments on commit 493679e

Please sign in to comment.