From dbb859d67a4901390ef60a1e01b25f69b26fd081 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 21 Jul 2022 19:46:31 +0200 Subject: Handling multiple IP addresses in container info command the same way for stopped containers as for started ones. Signed-off-by: Daniel Baumann --- libexec/container/info | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libexec/container/info b/libexec/container/info index d65258a..68666bb 100755 --- a/libexec/container/info +++ b/libexec/container/info @@ -180,10 +180,10 @@ case "${STATUS}" in *) if ls "${MACHINES}/${NAME}/etc/systemd/network"/*.network > /dev/null 2>&1 then - IP="$(awk -FAddress= '/^Address/ { print $2 }' ${MACHINES}/${NAME}/etc/systemd/network/*.network)" + IP="$(awk -FAddress= '/^Address/ { printf "%s ", $2 }' ${MACHINES}/${NAME}/etc/systemd/network/*.network)" elif [ -e "${MACHINES}/${NAME}/etc/network/interfaces" ] then - IP="$(awk '/address/ { print $2 }' ${MACHINES}/${NAME}/etc/network/interfaces)" + IP="$(awk '/address/ { printf "%s ", $2 }' ${MACHINES}/${NAME}/etc/network/interfaces)" fi IP="${IP:-n/a}" -- cgit v1.2.3