summaryrefslogtreecommitdiffstats
path: root/libexec/container/list
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-05-05 16:33:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-05-05 16:33:34 +0000
commitf3f0fb8c0dfed591c3c03ff7f2d00ebb8b52d4ae (patch)
tree241cc9d6148fe3d9b131bf7e344027df7eb59a8d /libexec/container/list
parentAdding upstream version 20220430. (diff)
downloadopen-infrastructure-compute-tools-f3f0fb8c0dfed591c3c03ff7f2d00ebb8b52d4ae.tar.xz
open-infrastructure-compute-tools-f3f0fb8c0dfed591c3c03ff7f2d00ebb8b52d4ae.zip
Adding upstream version 20220505.upstream/20220505
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libexec/container/list')
-rwxr-xr-xlibexec/container/list6
1 files changed, 3 insertions, 3 deletions
diff --git a/libexec/container/list b/libexec/container/list
index 2600bab..a56c1f8 100755
--- a/libexec/container/list
+++ b/libexec/container/list
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2022 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -387,10 +387,10 @@ do
*)
if ls "${MACHINES}/${CONTAINER}/etc/systemd/network"/*.network > /dev/null 2>&1
then
- ADDRESS="$(awk -FAddress= '/^Address/ { print $2 }' ${MACHINES}/${CONTAINER}/etc/systemd/network/*.network | head -n1)"
+ ADDRESS="$(for IP in $(awk -FAddress= '/^Address/ { print $2 }' ${MACHINES}/${CONTAINER}/etc/systemd/network/*.network); do echo -n "${IP} "; done)"
elif [ -e "${MACHINES}/${CONTAINER}/etc/network/interfaces" ]
then
- ADDRESS="$(awk '/address/ { print $2 }' ${MACHINES}/${CONTAINER}/etc/network/interfaces | head -n1)"
+ ADDRESS="$(for IP in $(awk '/address/ { print $2 }' ${MACHINES}/${CONTAINER}/etc/network/interfaces); do echo -n "${IP} "; done)"
fi
ADDRESS="${ADDRESS:-n/a}"