From c8d4fe0d93153c5cecab2cfaea9493b3851dd185 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 21 Dec 2016 10:22:36 +0100 Subject: Merging upstream version 20161220. Signed-off-by: Daniel Baumann --- lib/container/list | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/container/list b/lib/container/list index f9f46fb..da8a158 100755 --- a/lib/container/list +++ b/lib/container/list @@ -318,7 +318,10 @@ EOF ;; esac -CONTAINERS="$(cd "${MACHINES}" 2>/dev/null && find -maxdepth 1 -type d -and -not -name '.container-tools' -and -not -name 'container-tools' -and -not -name 'lost+found' -and -not -name '.snap' -and -not -name '.snapshot' -printf '%P\n' | sort)" +if ls "${MACHINES}"/* > /dev/null 2>&1 +then + CONTAINERS="$(cd "${MACHINES}" 2>/dev/null && find -maxdepth 1 -type d -and -not -name '.container-tools' -and -not -name 'container-tools' -and -not -name 'lost+found' -and -not -name '.snap' -and -not -name '.snapshot' -printf '%P\n' | sort)" +fi for CONTAINER in ${CONTAINERS} do @@ -401,6 +404,15 @@ EOF cat << EOF ], } +EOF + + ;; + + nwdiag) + +cat << EOF + } +} EOF ;; -- cgit v1.2.3