summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2019-09-19 18:18:55 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2019-09-19 18:18:55 +0000
commit018167a5a873750578863dbc1011a5aa9ab46530 (patch)
treefb85c9f4fa4d21e11363d6956fb7865ce9949291 /lib
parentReleasing version 20190811. (diff)
downloadcompute-tools-018167a5a873750578863dbc1011a5aa9ab46530.tar.xz
compute-tools-018167a5a873750578863dbc1011a5aa9ab46530.zip
Tightening Address lookup in container list command for systemd-networkd to not display MACAdresses instead of IPs.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to '')
-rwxr-xr-xlib/container/list2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/container/list b/lib/container/list
index 6b0d771..5427c90 100755
--- a/lib/container/list
+++ b/lib/container/list
@@ -367,7 +367,7 @@ do
if ls "${MACHINES}/${CONTAINER}/etc/systemd/network"/*.network > /dev/null 2>&1
then
- ADDRESS="$(awk -F= '/Address/ { print $2 }' ${MACHINES}/${CONTAINER}/etc/systemd/network/*.network | head -n1)"
+ ADDRESS="$(awk -F= '/^Address/ { print $2 }' ${MACHINES}/${CONTAINER}/etc/systemd/network/*.network | head -n1)"
elif [ -e "${MACHINES}/${CONTAINER}/etc/network/interfaces" ]
then
ADDRESS="$(awk '/address/ { print $2 }' ${MACHINES}/${CONTAINER}/etc/network/interfaces | head -n1)"