diff options
author | Daniel Baumann <mail@daniel-baumann.ch> | 2016-11-12 07:51:17 +0000 |
---|---|---|
committer | Daniel Baumann <mail@daniel-baumann.ch> | 2016-11-12 07:51:17 +0000 |
commit | e1818fb8f939a1977511090d06c53a3c66c0d682 (patch) | |
tree | f41ae8266df0ed99de0941d748d523d6f289c4bc /lib | |
parent | Adding upstream version 20161105. (diff) | |
download | open-infrastructure-compute-tools-e1818fb8f939a1977511090d06c53a3c66c0d682.tar.xz open-infrastructure-compute-tools-e1818fb8f939a1977511090d06c53a3c66c0d682.zip |
Adding upstream version 20161112.upstream/20161112
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/container/list | 5 | ||||
-rwxr-xr-x | lib/container/remove | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/container/list b/lib/container/list index e5e76fe..04e9f0f 100755 --- a/lib/container/list +++ b/lib/container/list @@ -183,9 +183,14 @@ do ;; esac + ADDRESSES="" + if ls "${MACHINES}/${CONTAINER}/etc/systemd/network"/*.network > /dev/null 2>&1 then ADDRESSES="$(awk -F= '/Address/ { print $2 }' ${MACHINES}/${CONTAINER}/etc/systemd/network/*.network)" + elif [ -e "${MACHINES}/${CONTAINER}/etc/network/interfaces" ] + then + ADDRESSES="$(awk '/address/ { print $2 }' ${MACHINES}/${CONTAINER}/etc/network/interfaces)" fi ADDRESSES="${ADDRESSES:-n/a}" diff --git a/lib/container/remove b/lib/container/remove index 843e9c3..04e7d30 100755 --- a/lib/container/remove +++ b/lib/container/remove @@ -82,7 +82,7 @@ then Usage fi -if [ ! -e "${MACHINES}/${NAME}" ] +if [ ! -e "${MACHINES}/${NAME}" ] && [ ! -e "${CONFIG}/${NAME}.conf" ] then echo "'${NAME}': no such container" >&2 exit 1 |