diff options
Diffstat (limited to '')
-rwxr-xr-x | lib/container/list | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/lib/container/list b/lib/container/list index 8e6f5bc..57d0d2d 100755 --- a/lib/container/list +++ b/lib/container/list @@ -1,6 +1,5 @@ #!/bin/sh -# container-tools - Manage systemd-nspawn containers # Copyright (C) 2014-2019 Daniel Baumann <daniel.baumann@open-infrastructure.net> # # SPDX-License-Identifier: GPL-3.0+ @@ -20,13 +19,15 @@ set -e +PROJECT="open-infrastructure" +PROGRAM="container" COMMAND="$(basename ${0})" -CONFIG="/etc/container-tools/config" -HOOKS="/etc/container-tools/hooks" +CONFIG="/etc/${PROJECT}/${PROGRAM}/config" +HOOKS="/etc/${PROJECT}/${PROGRAM}/hooks" MACHINES="/var/lib/machines" -VERSION="$(container version)" +VERSION="$(${PROGRAM} version)" Parameters () { @@ -106,7 +107,7 @@ Parameters () Usage () { - echo "Usage: container ${COMMAND} [-a|--all] [--csv-separator SEPARATOR] [--format FORMAT] [-h|--host HOSTNAME] [--nwdiag-color COLOR] [--nwdiag-label LABEL] [-o|--other] [-s|--started] [-t|--stopped]" >&2 + echo "Usage: ${PROGRAM} ${COMMAND} [-a|--all] [--csv-separator SEPARATOR] [--format FORMAT] [-h|--host HOSTNAME] [--nwdiag-color COLOR] [--nwdiag-label LABEL] [-o|--other] [-s|--started] [-t|--stopped]" >&2 exit 1 } @@ -233,7 +234,7 @@ EOF csv) cat << EOF -# container-tools version ${VERSION} +# compute-tools ${VERSION} Host${CSV_SEPARATOR}Container${CSV_SEPARATOR}Status${CSV_SEPARATOR}IPv4-Address EOF @@ -243,7 +244,7 @@ EOF cat << EOF { - "container-tools": { + "compute-tools": { "version": "${VERSION}", }, "host": { @@ -258,7 +259,7 @@ EOF NETWORK="$(echo ${HOST} | sed -e 's|\.|_|g')" cat << EOF -# container-tools ${VERSION} +# compute-tools ${VERSION} nwdiag { external_connector = none; network ${NETWORK} { @@ -294,7 +295,7 @@ EOF cat << EOF --- -container_tools: +compute_tools: version: ${VERSION} host: @@ -308,9 +309,9 @@ EOF xml) cat << EOF -<container-tools> +<compute-tools> <version>${VERSION}</version> -</container-tools> +</compute-tools> <host> <name>${HOST}</name> </host> |