summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2016-08-11 17:11:39 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2016-11-06 08:33:48 +0000
commit021acdd50f2a31f96d1eb400649e30736a9f09f3 (patch)
tree8d980ef30513a737b716fede3763927a067a84dd
parentUsing systemd-networkd in container instead of ifupdown. (diff)
downloadcompute-tools-021acdd50f2a31f96d1eb400649e30736a9f09f3.tar.xz
compute-tools-021acdd50f2a31f96d1eb400649e30736a9f09f3.zip
Updating container list command to use systemd-networkd config instead of ifupdown.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
-rwxr-xr-xlib/container/list4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/container/list b/lib/container/list
index d522623..e5e76fe 100755
--- a/lib/container/list
+++ b/lib/container/list
@@ -183,9 +183,9 @@ do
;;
esac
- if [ -e "${MACHINES}/${CONTAINER}/etc/network/interfaces" ]
+ if ls "${MACHINES}/${CONTAINER}/etc/systemd/network"/*.network > /dev/null 2>&1
then
- ADDRESSES="$(awk '/address/ { print $2 }' ${MACHINES}/${CONTAINER}/etc/network/interfaces)"
+ ADDRESSES="$(awk -F= '/Address/ { print $2 }' ${MACHINES}/${CONTAINER}/etc/systemd/network/*.network)"
fi
ADDRESSES="${ADDRESSES:-n/a}"