summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2016-12-11 12:34:23 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2016-12-11 12:34:23 +0000
commit83e6c0c55c255c069e5ee5bf9cb2d8d5f2b83f2a (patch)
treed10157feb045e099bacae644b0832c1522560f07 /share
parentAdding upstream version 20161201. (diff)
downloadopen-infrastructure-compute-tools-83e6c0c55c255c069e5ee5bf9cb2d8d5f2b83f2a.tar.xz
open-infrastructure-compute-tools-83e6c0c55c255c069e5ee5bf9cb2d8d5f2b83f2a.zip
Adding upstream version 20161210.upstream/20161210
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'share')
-rw-r--r--share/bash-completion/container18
-rw-r--r--share/man/container-auto.1.txt2
-rw-r--r--share/man/container-console.1.txt2
-rw-r--r--share/man/container-create-curl.1.txt2
-rw-r--r--share/man/container-create-debconf.1.txt2
-rw-r--r--share/man/container-create-debootstrap.1.txt2
-rw-r--r--share/man/container-create.1.txt2
-rw-r--r--share/man/container-enter.1.txt2
-rw-r--r--share/man/container-limit.1.txt2
-rw-r--r--share/man/container-list.1.txt37
-rw-r--r--share/man/container-move.1.txt86
-rw-r--r--share/man/container-remove.1.txt2
-rw-r--r--share/man/container-restart.1.txt2
-rw-r--r--share/man/container-shell.1.txt2
-rw-r--r--share/man/container-start.1.txt2
-rw-r--r--share/man/container-status.1.txt2
-rw-r--r--share/man/container-stop.1.txt2
-rw-r--r--share/man/container-version.1.txt2
-rw-r--r--share/man/container.1.txt5
-rwxr-xr-xshare/scripts/curl19
-rwxr-xr-xshare/scripts/debconf19
-rwxr-xr-xshare/scripts/debootstrap19
22 files changed, 203 insertions, 30 deletions
diff --git a/share/bash-completion/container b/share/bash-completion/container
index e49311a..8d54ba4 100644
--- a/share/bash-completion/container
+++ b/share/bash-completion/container
@@ -47,7 +47,7 @@ _container()
*)
case "${prev}" in
-n|--name)
- opts=$(container list -s -f short)
+ opts=$(container list -s -f shell)
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;
@@ -93,7 +93,7 @@ _container()
*)
case "${prev}" in
-n|--name)
- opts=$(container list -s -f short)
+ opts=$(container list -s -f shell)
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;
@@ -113,7 +113,7 @@ _container()
*)
case "${prev}" in
-n|--name)
- opts=$(container list -a -f short)
+ opts=$(container list -a -f shell)
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;
@@ -139,7 +139,7 @@ _container()
;;
-f|--format)
- opts="short full"
+ opts="cli csv json nwdiag shell yaml xml"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;
@@ -159,7 +159,7 @@ _container()
*)
case "${prev}" in
-n|--name)
- opts=$(container list -t -f short)
+ opts=$(container list -t -f shell)
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;
@@ -179,7 +179,7 @@ _container()
*)
case "${prev}" in
-n|--name)
- opts=$(container list -s -f short)
+ opts=$(container list -s -f shell)
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;
@@ -199,7 +199,7 @@ _container()
*)
case "${prev}" in
-n|--name)
- opts=$(container list -t -f short)
+ opts=$(container list -t -f shell)
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;
@@ -219,7 +219,7 @@ _container()
*)
case "${prev}" in
-n|--name)
- opts=$(container list -t -f short)
+ opts=$(container list -t -f shell)
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;
@@ -239,7 +239,7 @@ _container()
*)
case "${prev}" in
-n|--name)
- opts=$(container list -s -f short)
+ opts=$(container list -s -f shell)
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;
diff --git a/share/man/container-auto.1.txt b/share/man/container-auto.1.txt
index e3ece8a..0eb76d2 100644
--- a/share/man/container-auto.1.txt
+++ b/share/man/container-auto.1.txt
@@ -71,7 +71,7 @@ More information about container-tools and the Open Infrastructure project can b
CONTACT
-------
Bug reports, feature requests, help, patches, support and everything else
-are welcome on the Open Infrastructure Software Mailing List software@lists.open-infrastructure.net.
+are welcome on the Open Infrastructure Software Mailing List <software@lists.open-infrastructure.net>.
Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs.debian.org.
diff --git a/share/man/container-console.1.txt b/share/man/container-console.1.txt
index 65f1621..7b25125 100644
--- a/share/man/container-console.1.txt
+++ b/share/man/container-console.1.txt
@@ -65,7 +65,7 @@ More information about container-tools and the Open Infrastructure project can b
CONTACT
-------
Bug reports, feature requests, help, patches, support and everything else
-are welcome on the Open Infrastructure Software Mailing List software@lists.open-infrastructure.net.
+are welcome on the Open Infrastructure Software Mailing List <software@lists.open-infrastructure.net>.
Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs.debian.org.
diff --git a/share/man/container-create-curl.1.txt b/share/man/container-create-curl.1.txt
index 68fc0e2..e046b24 100644
--- a/share/man/container-create-curl.1.txt
+++ b/share/man/container-create-curl.1.txt
@@ -112,7 +112,7 @@ More information about container-tools and the Open Infrastructure project can b
CONTACT
-------
Bug reports, feature requests, help, patches, support and everything else
-are welcome on the Open Infrastructure Software Mailing List software@lists.open-infrastructure.net.
+are welcome on the Open Infrastructure Software Mailing List <software@lists.open-infrastructure.net>.
Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs.debian.org.
diff --git a/share/man/container-create-debconf.1.txt b/share/man/container-create-debconf.1.txt
index 9e765f3..a51dfef 100644
--- a/share/man/container-create-debconf.1.txt
+++ b/share/man/container-create-debconf.1.txt
@@ -144,7 +144,7 @@ More information about container-tools and the Open Infrastructure project can b
CONTACT
-------
Bug reports, feature requests, help, patches, support and everything else
-are welcome on the Open Infrastructure Software Mailing List software@lists.open-infrastructure.net.
+are welcome on the Open Infrastructure Software Mailing List <software@lists.open-infrastructure.net>.
Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs.debian.org.
diff --git a/share/man/container-create-debootstrap.1.txt b/share/man/container-create-debootstrap.1.txt
index 4c7bbcb..9de3f94 100644
--- a/share/man/container-create-debootstrap.1.txt
+++ b/share/man/container-create-debootstrap.1.txt
@@ -86,7 +86,7 @@ More information about container-tools and the Open Infrastructure project can b
CONTACT
-------
Bug reports, feature requests, help, patches, support and everything else
-are welcome on the Open Infrastructure Software Mailing List software@lists.open-infrastructure.net.
+are welcome on the Open Infrastructure Software Mailing List <software@lists.open-infrastructure.net>.
Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs.debian.org.
diff --git a/share/man/container-create.1.txt b/share/man/container-create.1.txt
index fa6b713..0fd5187 100644
--- a/share/man/container-create.1.txt
+++ b/share/man/container-create.1.txt
@@ -102,7 +102,7 @@ More information about container-tools and the Open Infrastructure project can b
CONTACT
-------
Bug reports, feature requests, help, patches, support and everything else
-are welcome on the Open Infrastructure Software Mailing List software@lists.open-infrastructure.net.
+are welcome on the Open Infrastructure Software Mailing List <software@lists.open-infrastructure.net>.
Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs.debian.org.
diff --git a/share/man/container-enter.1.txt b/share/man/container-enter.1.txt
index 6339e74..42a7211 100644
--- a/share/man/container-enter.1.txt
+++ b/share/man/container-enter.1.txt
@@ -65,7 +65,7 @@ More information about container-tools and the Open Infrastructure project can b
CONTACT
-------
Bug reports, feature requests, help, patches, support and everything else
-are welcome on the Open Infrastructure Software Mailing List software@lists.open-infrastructure.net.
+are welcome on the Open Infrastructure Software Mailing List <software@lists.open-infrastructure.net>.
Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs.debian.org.
diff --git a/share/man/container-limit.1.txt b/share/man/container-limit.1.txt
index 7fedc5b..9fc9cba 100644
--- a/share/man/container-limit.1.txt
+++ b/share/man/container-limit.1.txt
@@ -98,7 +98,7 @@ More information about container-tools and the Open Infrastructure project can b
CONTACT
-------
Bug reports, feature requests, help, patches, support and everything else
-are welcome on the Open Infrastructure Software Mailing List software@lists.open-infrastructure.net.
+are welcome on the Open Infrastructure Software Mailing List <software@lists.open-infrastructure.net>.
Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs.debian.org.
diff --git a/share/man/container-list.1.txt b/share/man/container-list.1.txt
index 5aa9f22..d964c4e 100644
--- a/share/man/container-list.1.txt
+++ b/share/man/container-list.1.txt
@@ -46,12 +46,21 @@ The following container options are available, defaults to *--started --stopped*
*-a, --all*::
List all available container (started, stopped, and other).
+*--csv-separator='SEPARATOR'*::
+ Specify custom CSV separator, defaults to ','.
+
*-f, --format='FORMAT'*::
- Use format to list container. Currently available formats are 'short' or 'full' (default).
+ Use format to list container. Currently available formats are 'cli' (default), 'csv', 'json', 'nwdiag', 'shell', 'yaml', or 'xml'.
*-h, --host='HOSTNAME'*::
List only container that are enabled for automatic start on the specified hostname. Defaults to list containers of the local system only. Using 'all' shows all container regardless of any automatic start configuration.
+*--nwdiag-color='COLOR'*::
+ Specify custom nwdiag color for the host box, defaults to '#3465a4'.
+
+*--nwdiag-label='LABEL'*::
+ Specify custom nwdiag label for the diagram, defaults to empty.
+
*-o, --other*::
List only container that are not enable for automatic start on the current system.
@@ -66,12 +75,30 @@ EXAMPLES
*List all started and stopped containers of the local system:*::
sudo container list
-*List all started and stopped containers of the local system as a machine-readable list:*::
- sudo container list -f short
-
*List all started and other containers:*::
sudo container list -s -o
+*Create a CSV export of all started and stopped containers:*::
+ sudo container list -f csv
+
+*Create a JSON export of all started and stopped containers:*::
+ sudo container list -f json
+
+*Create a nwdiag export of all started and stopped containers:*::
+ sudo container list -f nwdiag
+
+*Create a SVG image via nwdiag of all started and stopped containers:*::
+ sudo container list -f nwdiag | nwdiag -T svg -o cnt-list.svg -
+
+*Create a shell export of all started and stopped containers:*::
+ sudo container list -f shell
+
+*Create a YAML export of all started and stopped containers:*::
+ sudo container list -f yaml
+
+*Create a XML export of all started and stopped containers:*::
+ sudo container list -f xml
+
SEE ALSO
--------
@@ -87,7 +114,7 @@ More information about container-tools and the Open Infrastructure project can b
CONTACT
-------
Bug reports, feature requests, help, patches, support and everything else
-are welcome on the Open Infrastructure Software Mailing List software@lists.open-infrastructure.net.
+are welcome on the Open Infrastructure Software Mailing List <software@lists.open-infrastructure.net>.
Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs.debian.org.
diff --git a/share/man/container-move.1.txt b/share/man/container-move.1.txt
new file mode 100644
index 0000000..43e04bc
--- /dev/null
+++ b/share/man/container-move.1.txt
@@ -0,0 +1,86 @@
+// container-tools - Manage systemd-nspawn containers
+// Copyright (C) 2014-2016 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+//
+// This program is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+CONTAINER-REMOVE(1)
+===================
+:doctype: manpage
+:man manual: Open Infrastructure
+:man source: container-tools
+:man version: {revnumber}
+
+
+NAME
+----
+container-move - Rename a container
+
+
+SYNOPSIS
+--------
+*container move* ['OPTIONS']
+
+*container mv* ['OPTIONS']
+
+
+DESCRIPTION
+-----------
+The container move commands renames a container.
+
+
+OPTIONS
+-------
+The following container options are available:
+
+*-n, --new='NAME'*::
+ Specify new container name.
+
+*-f, --force*::
+ Do not prompt before moving.
+
+*-o, --old*::
+ Specify old container name.
+
+
+EXAMPLES
+--------
+*Rename example.net container to example.org:*::
+ sudo container move -n example.org -o example.net
+
+*Rename example.net container to example.org without prompt:*::
+ sudo container move -n example.org -o example.net -f
+
+
+SEE ALSO
+--------
+container-tools(7),
+container(1).
+
+
+HOMEPAGE
+--------
+More information about container-tools and the Open Infrastructure project can be found on the homepage at https://open-infrastructure.net.
+
+
+CONTACT
+-------
+Bug reports, feature requests, help, patches, support and everything else
+are welcome on the Open Infrastructure Software Mailing List <software@lists.open-infrastructure.net>.
+
+Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs.debian.org.
+
+
+AUTHORS
+-------
+container-tools was written by Daniel Baumann <daniel.baumann@open-infrastructure.net>.
diff --git a/share/man/container-remove.1.txt b/share/man/container-remove.1.txt
index d5724bd..843fa5e 100644
--- a/share/man/container-remove.1.txt
+++ b/share/man/container-remove.1.txt
@@ -76,7 +76,7 @@ More information about container-tools and the Open Infrastructure project can b
CONTACT
-------
Bug reports, feature requests, help, patches, support and everything else
-are welcome on the Open Infrastructure Software Mailing List software@lists.open-infrastructure.net.
+are welcome on the Open Infrastructure Software Mailing List <software@lists.open-infrastructure.net>.
Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs.debian.org.
diff --git a/share/man/container-restart.1.txt b/share/man/container-restart.1.txt
index 181c754..2aed923 100644
--- a/share/man/container-restart.1.txt
+++ b/share/man/container-restart.1.txt
@@ -65,7 +65,7 @@ More information about container-tools and the Open Infrastructure project can b
CONTACT
-------
Bug reports, feature requests, help, patches, support and everything else
-are welcome on the Open Infrastructure Software Mailing List software@lists.open-infrastructure.net.
+are welcome on the Open Infrastructure Software Mailing List <software@lists.open-infrastructure.net>
Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs.debian.org.
diff --git a/share/man/container-shell.1.txt b/share/man/container-shell.1.txt
index 1059d0e..38a8034 100644
--- a/share/man/container-shell.1.txt
+++ b/share/man/container-shell.1.txt
@@ -68,7 +68,7 @@ More information about container-tools and the Open Infrastructure project can b
CONTACT
-------
Bug reports, feature requests, help, patches, support and everything else
-are welcome on the Open Infrastructure Software Mailing List software@lists.open-infrastructure.net.
+are welcome on the Open Infrastructure Software Mailing List <software@lists.open-infrastructure.net>.
Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs.debian.org.
diff --git a/share/man/container-start.1.txt b/share/man/container-start.1.txt
index a225a7c..64c4b3c 100644
--- a/share/man/container-start.1.txt
+++ b/share/man/container-start.1.txt
@@ -68,7 +68,7 @@ More information about container-tools and the Open Infrastructure project can b
CONTACT
-------
Bug reports, feature requests, help, patches, support and everything else
-are welcome on the Open Infrastructure Software Mailing List software@lists.open-infrastructure.net.
+are welcome on the Open Infrastructure Software Mailing List <software@lists.open-infrastructure.net>.
Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs.debian.org.
diff --git a/share/man/container-status.1.txt b/share/man/container-status.1.txt
index db81d3b..8da969f 100644
--- a/share/man/container-status.1.txt
+++ b/share/man/container-status.1.txt
@@ -65,7 +65,7 @@ More information about container-tools and the Open Infrastructure project can b
CONTACT
-------
Bug reports, feature requests, help, patches, support and everything else
-are welcome on the Open Infrastructure Software Mailing List software@lists.open-infrastructure.net.
+are welcome on the Open Infrastructure Software Mailing List <software@lists.open-infrastructure.net>.
Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs.debian.org.
diff --git a/share/man/container-stop.1.txt b/share/man/container-stop.1.txt
index 6113fd5..07426af 100644
--- a/share/man/container-stop.1.txt
+++ b/share/man/container-stop.1.txt
@@ -71,7 +71,7 @@ More information about container-tools and the Open Infrastructure project can b
CONTACT
-------
Bug reports, feature requests, help, patches, support and everything else
-are welcome on the Open Infrastructure Software Mailing List software@lists.open-infrastructure.net.
+are welcome on the Open Infrastructure Software Mailing List <software@lists.open-infrastructure.net>.
Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs.debian.org.
diff --git a/share/man/container-version.1.txt b/share/man/container-version.1.txt
index d4a8713..bb11d40 100644
--- a/share/man/container-version.1.txt
+++ b/share/man/container-version.1.txt
@@ -64,7 +64,7 @@ More information about container-tools and the Open Infrastructure project can b
CONTACT
-------
Bug reports, feature requests, help, patches, support and everything else
-are welcome on the Open Infrastructure Software Mailing List software@lists.open-infrastructure.net.
+are welcome on the Open Infrastructure Software Mailing List <software@lists.open-infrastructure.net>.
Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs.debian.org.
diff --git a/share/man/container.1.txt b/share/man/container.1.txt
index 670efbe..f76bbda 100644
--- a/share/man/container.1.txt
+++ b/share/man/container.1.txt
@@ -64,6 +64,9 @@ The following container commands are available:
*remove*::
Remove a container, see container-remove(1).
+*move*::
+ Rename a container, see container-move(1).
+
*console*::
Attach console to a container, see container-console(1).
@@ -126,7 +129,7 @@ More information about container-tools and the Open Infrastructure project can b
CONTACT
-------
Bug reports, feature requests, help, patches, support and everything else
-are welcome on the Open Infrastructure Software Mailing List software@lists.open-infrastructure.net.
+are welcome on the Open Infrastructure Software Mailing List <software@lists.open-infrastructure.net>.
Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs.debian.org.
diff --git a/share/scripts/curl b/share/scripts/curl
index 6b7d6a0..69badd9 100755
--- a/share/scripts/curl
+++ b/share/scripts/curl
@@ -20,6 +20,7 @@ set -e
SCRIPT="${0}"
+HOOKS="/etc/container-tools/hooks"
MACHINES="/var/lib/machines"
CACHE="/var/cache/container-tools/images"
@@ -132,6 +133,15 @@ PASSWORD="${PASSWORD:-$(dd if=/dev/urandom bs=12 count=1 2> /dev/null | base64)}
VERSION="$(container version)"
+# Pre hooks
+for FILE in "${HOOKS}/pre-${SCRIPT}".* "${HOOKS}/${NAME}.pre-${SCRIPT}"
+do
+ if [ -x "${FILE}" ]
+ then
+ "${FILE}"
+ fi
+done
+
# Run
# FIXME: Show available image directories on server
@@ -227,3 +237,12 @@ case "${CLEAN}" in
rm -f "${CACHE}/${IMAGE}.sha512"
;;
esac
+
+# Post hooks
+for FILE in "${HOOKS}/post-${SCRIPT}".* "${HOOKS}/${NAME}.post-${SCRIPT}"
+do
+ if [ -x "${FILE}" ]
+ then
+ "${FILE}"
+ fi
+done
diff --git a/share/scripts/debconf b/share/scripts/debconf
index cde66cb..72e9c85 100755
--- a/share/scripts/debconf
+++ b/share/scripts/debconf
@@ -21,6 +21,7 @@ set -e
SCRIPT="${0}"
CONFIG="/etc/container-tools/config"
+HOOKS="/etc/container-tools/hooks"
MACHINES="/var/lib/machines"
Parameters ()
@@ -964,6 +965,15 @@ Debconf
export NAME
+# Pre hooks
+for FILE in "${HOOKS}/pre-${SCRIPT}".* "${HOOKS}/${NAME}.pre-${SCRIPT}"
+do
+ if [ -x "${FILE}" ]
+ then
+ "${FILE}"
+ fi
+done
+
# Run debconf parts
for SCRIPT in /usr/share/container-tools/scripts/debconf.d/*
do
@@ -1077,3 +1087,12 @@ fi
# remove debconf temporary files
rm --preserve-root --one-file-system -rf "${DEBCONF_TMPDIR}"
rmdir --ignore-fail-on-non-empty /tmp/container-tools 2>&1 || true
+
+# Post hooks
+for FILE in "${HOOKS}/post-${SCRIPT}".* "${HOOKS}/${NAME}.post-${SCRIPT}"
+do
+ if [ -x "${FILE}" ]
+ then
+ "${FILE}"
+ fi
+done
diff --git a/share/scripts/debootstrap b/share/scripts/debootstrap
index 9c76ba0..2da573d 100755
--- a/share/scripts/debootstrap
+++ b/share/scripts/debootstrap
@@ -20,6 +20,7 @@ set -e
SCRIPT="${0}"
+HOOKS="/etc/container-tools/hooks"
MACHINES="/var/lib/machines"
Parameters ()
@@ -137,6 +138,15 @@ case "${MIRROR}" in
;;
esac
+# Pre hooks
+for FILE in "${HOOKS}/pre-${SCRIPT}".* "${HOOKS}/${NAME}.pre-${SCRIPT}"
+do
+ if [ -x "${FILE}" ]
+ then
+ "${FILE}"
+ fi
+done
+
mkdir -p "${MACHINES}"
debootstrap --arch=${ARCHITECTURE} --include=${INCLUDE} ${DISTRIBUTION} ${MACHINES}/${NAME} ${MIRROR}
@@ -148,3 +158,12 @@ echo "${NAME}" > "${MACHINES}/${NAME}/etc/hostname"
# Setting root password
echo root:${PASSWORD} | chroot "${MACHINES}/${NAME}" chpasswd
echo "${NAME}: root password set to '${PASSWORD}'."
+
+# Post hooks
+for FILE in "${HOOKS}/post-${SCRIPT}".* "${HOOKS}/${NAME}.post-${SCRIPT}"
+do
+ if [ -x "${FILE}" ]
+ then
+ "${FILE}"
+ fi
+done