summaryrefslogtreecommitdiffstats
path: root/lib/container/list
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2019-02-17 10:52:12 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2019-02-23 15:22:19 +0000
commit0f0239db45cbd40ff79f301bbade2f2dcb005931 (patch)
treed66fc84e20c05d71a083b4020ab549a7fd277d22 /lib/container/list
parentRemoving manpage symlinks in uninstall target too. (diff)
downloadcompute-tools-0f0239db45cbd40ff79f301bbade2f2dcb005931.tar.xz
compute-tools-0f0239db45cbd40ff79f301bbade2f2dcb005931.zip
Renaming container-tools to compute-tools.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to '')
-rwxr-xr-xlib/container/list23
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>