summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2017-07-23 08:28:46 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2017-07-23 08:29:10 +0000
commit098f18a504d97fec24bbe619370cdd2ca0d5b500 (patch)
treeae6f100cedf2537ad070f3fdb9977fa6ada16bcc
parentReleasing debian version 20170701-1. (diff)
downloadopen-infrastructure-compute-tools-098f18a504d97fec24bbe619370cdd2ca0d5b500.tar.xz
open-infrastructure-compute-tools-098f18a504d97fec24bbe619370cdd2ca0d5b500.zip
Merging upstream version 20170722.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--CHANGELOG.txt350
-rw-r--r--README.txt108
-rw-r--r--VERSION.txt2
-rwxr-xr-xbin/container-shell16
-rwxr-xr-xlib/container/key149
-rwxr-xr-xlib/container/limit22
-rwxr-xr-xlib/container/start24
-rw-r--r--share/bash-completion/container9
-rw-r--r--share/doc/HOST-SETUP.txt42
-rwxr-xr-xshare/doc/examples/container-images.sh55
-rw-r--r--share/doc/examples/dschinn-backports.cfg41
-rw-r--r--share/doc/examples/stretch.cfg7
-rw-r--r--share/man/container-auto.180
-rw-r--r--share/man/container-console.165
-rw-r--r--share/man/container-create-curl.1165
-rw-r--r--share/man/container-create-curl.1.txt18
-rw-r--r--share/man/container-create-debconf.1179
-rw-r--r--share/man/container-create-debootstrap.1126
-rw-r--r--share/man/container-create.1134
-rw-r--r--share/man/container-enter.165
-rw-r--r--share/man/container-key.180
-rw-r--r--share/man/container-key.1.txt85
-rw-r--r--share/man/container-limit.1120
-rw-r--r--share/man/container-limit.1.txt8
-rw-r--r--share/man/container-list.1159
-rw-r--r--share/man/container-move.182
-rw-r--r--share/man/container-remove.182
-rw-r--r--share/man/container-restart.165
-rw-r--r--share/man/container-shell.1132
-rw-r--r--share/man/container-start.170
-rw-r--r--share/man/container-status.165
-rw-r--r--share/man/container-stop.175
-rw-r--r--share/man/container-tools.7281
-rw-r--r--share/man/container-top.165
-rw-r--r--share/man/container-version.162
-rw-r--r--share/man/container.1175
-rw-r--r--share/man/container.1.txt3
-rwxr-xr-xshare/scripts/curl328
-rwxr-xr-xshare/scripts/curl.d/0001-debconf53
-rw-r--r--share/scripts/curl.d/0001-debconf.templates11
-rwxr-xr-xshare/scripts/debconf58
-rwxr-xr-xshare/scripts/debconf.d/0003-debconf106
-rw-r--r--share/scripts/debconf.d/0003-debconf.templates30
43 files changed, 3537 insertions, 315 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 95b0bf4..11575d6 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,52 +1,129 @@
+2017-07-22 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20170722.
+
+ * Backward incompatible changes:
+ - new default URL to download images in curl create script (files.open-infrastructure.net)
+ - new default for bridge interface (bridge0 instead of br0)
+ - new default for container interface (eno1 instead of eth0)
+ - renaming --image option to --system in curl container create script
+ - renaming curl image cache directory from /var/cache/container-tools/images to /var/cache/container-tools/system
+ - Starting to count at 1 instead of 0 in preseed files:
+
+ old: container-tools cnt-debconf/archive0/...
+ new: container-tools cnt-debconf/archive1/...
+
+ old: container-tools cnt-debconf/network0/...
+ new: container-tools cnt-debconf/network1/...
+
+ [ Daniel Baumann ]
+ * Wrapping changelog to 80 characters per line.
+ * Adding myself to copyright notice in bash-completion.
+
+ [ Simon Spöhel ]
+ * Fixing spelling typo in 'bandwidth'.
+
+ [ Daniel Baumann ]
+ * Adding interface max length check in container start command.
+ * Adding message about enabled and disabled container commands in container-shell help.
+ * Updating output of container-shell help.
+ * Also creating lz compressed container-images in example script.
+ * Correcting typo in comment in curl container create script.
+ * Updating default url to download images from in curl container create script.
+ * Adding cnt-debconf/mode preseed field to allow embedding container create script within preseed file itself without relying on a specific default create script being set on the host system, thanks to David Kunz for the idea.
+ * Using default bridge0 instead of br0 as default bridge interface.
+ * Using default eno1 instead of eth0 as default container interface.
+ * Removing unreachable fallback for veth0, always the short-hostname is used anyway.
+ * Adding knot-resolver to dschinn-backports preseed example.
+ * Making sha512 checksum optional for image downloads in curl container create script.
+ * Adding error messages in curl container create script if required decompressors are not installed.
+ * Dynamically prefer lzip over xz over gz in curl container create script, depending on if required decompressors are already installed on the host system.
+ * Reshuffeling curl options handling in curl container create script.
+ * Adjusting messages output in curl container create script.
+ * Reshuffeling checksum handling in curl container create script.
+ * Adding support for setup tarballs in curl container create script for appliance style setup of prebuilt containers.
+ * Sorting password option handling in curl container create script.
+ * Adding gzip dependency check in curl container create script for completness sake.
+ * Renaming --image option to --system in curl container create script for consistency.
+ * Adding --setup option in curl container create script to manually specify a custom setup tarball.
+ * Updating container-create-curl manpage to match current curl container create script.
+ * Updating container-images.sh example script to match current curl container create script expectations.
+ * Updating default filename for download in curl container create script.
+ * Passing container name to setup environment in curl container create script.
+ * Moving image cache from /var/cache/container-tools/images to /var/cache/container-tools/system for consistency.
+ * Adding container key command.
+ * Adding GPG signature verification for curl container create script.
+ * Adding interactive container list in curl container create script.
+ * Adding automatic compression detection for downloads in in curl container create directory.
+ * Adding architecture option to curl container create script.
+ * Making example preseed files non-interactive.
+ * Starting to count at 1 instead of 0 to be consistent with new network interface names in network and archive preseeding arrays.
+
2017-07-01 Daniel Baumann <daniel.baumann@open-infrastructure.net>
* Releasing version 20170701.
[ Daniel Baumann ]
- * Correcting boolean typo when checking for existence of new container in container move command, thanks to Simon Spöhel <simon.spoehel@open-infrastructure.net>.
- * Avoid removing top-level directories when cleaning up bind mounts in container remove and stop commands.
- * Also removing /etc/localtime before reconfiguring tzdata to workaround broken tzdata preseed handling (see several bug reports in the BTS), thanks to Nik Lutz <nik@netstyle.ch>.
+ * Correcting boolean typo when checking for existence of new container
+ in container move command, thanks to Simon Spöhel
+ <simon.spoehel@open-infrastructure.net>.
+ * Avoid removing top-level directories when cleaning up bind mounts in
+ container remove and stop commands.
+ * Also removing /etc/localtime before reconfiguring tzdata to workaround
+ broken tzdata preseed handling (see several bug reports in the BTS),
+ thanks to Nik Lutz <nik@netstyle.ch>.
2017-06-29 Daniel Baumann <daniel.baumann@open-infrastructure.net>
* Releasing version 20170629.
* Backward incompatible changes:
- - container auto configuration in the [start] section to
- entangle shared storage/automatically start at boot time
- support:
+ - container auto configuration in the [start] section to entangle
+ shared storage/automatically start at boot time support:
old: cnt.auto=true
new: cnt.auto=true
cnt.container-server=${FQDN}
- whereas ${FQDN} needs to be replaced with the actual hostname
- of the container server.
+ whereas ${FQDN} needs to be replaced with the actual hostname of the
+ container server.
[ Daniel Baumann ]
* Removing useless whitespace in debconf script.
* Correcting typo in systemd parts of the Makefile's uninstall target.
[ Nik Lutz ]
- * Implementing postup/postdown for systemd-networkd by creating systemd units in /etc/systemd/system.
+ * Implementing postup/postdown for systemd-networkd by creating systemd
+ units in /etc/systemd/system.
[ Daniel Baumann ]
- * Dropping obsolete LTS archive definitions, thanks to Nik Lutz <nik@netstyle.ch>.
+ * Dropping obsolete LTS archive definitions, thanks to Nik Lutz
+ <nik@netstyle.ch>.
* Using allow-hotplug instead of allow in host-setup documentation.
- * Removing net-tools from host-setup documentation, it is a direct depends of container-tools for the time being.
- * Renaming cnt.auto to cnt.container-server in order to split functionality of 'binding container to a specific host system' from 'starting container at system boot'.
- * Executing auto commands only when cnt.auto=true and cnt.container-server matches the current hostname.
- * Adding CONTAINER_COMMANDS_ENABLE variable for container-shell to add support for allowing certain container commands for a specific container-shell invocation only.
- * Adding CONTAINER_COMMANDS_DISABLE variable for container-shell to add support for disallowing certain container commands for a specific container-shell invocation only.
- * Documenting usage of container-shell command restrictions in container-shell manpage.
+ * Removing net-tools from host-setup documentation, it is a direct
+ depends of container-tools for the time being.
+ * Renaming cnt.auto to cnt.container-server in order to split
+ functionality of 'binding container to a specific host system' from
+ 'starting container at system boot'.
+ * Executing auto commands only when cnt.auto=true and
+ cnt.container-server matches the current hostname.
+ * Adding CONTAINER_COMMANDS_ENABLE variable for container-shell to add
+ support for allowing certain container commands for a specific
+ container-shell invocation only.
+ * Adding CONTAINER_COMMANDS_DISABLE variable for container-shell to add
+ support for disallowing certain container commands for a specific
+ container-shell invocation only.
+ * Documenting usage of container-shell command restrictions in
+ container-shell manpage.
* Using more systemd-ish status symbols in container list command.
* Adding new container top command.
* Adding new container top command manpage.
* Updating bash-completion for container top command.
* Adjusting container list outout for container top command.
* Harmonizing edition of container configuration file in debconf script.
- * Allow cnt.auto=force-true to enforce startup of a locked container at system startup.
+ * Allow cnt.auto=force-true to enforce startup of a locked container at
+ system startup.
2017-05-22 Daniel Baumann <daniel.baumann@open-infrastructure.net>
@@ -54,7 +131,8 @@
[ Daniel Baumann ]
* Correcting bind-ro option handling to actually work.
- * Reverting "Purging packages that got removed/replaced during container creation.", not needed anymore.
+ * Reverting "Purging packages that got removed/replaced during container
+ creation.", not needed anymore.
2017-05-10 Daniel Baumann <daniel.baumann@open-infrastructure.net>
@@ -63,8 +141,10 @@
[ Daniel Baumann ]
* Purging packages when autoremoving them.
* Purging packages that got removed/replaced during container creation.
- * Adding missing bind-ro handling in container create command, thanks to Simon Spöhel <simon.spoehel@open-infrastructure.net>.
- * Adding sysctl config for procps to increase inotify limits in order to run more than a few containers on a system.
+ * Adding missing bind-ro handling in container create command, thanks to
+ Simon Spöhel <simon.spoehel@open-infrastructure.net>.
+ * Adding sysctl config for procps to increase inotify limits in order to
+ run more than a few containers on a system.
* Updating list of excluded directory names in container list command.
2017-04-05 Daniel Baumann <daniel.baumann@open-infrastructure.net>
@@ -72,7 +152,8 @@
* Releasing version 20170405.
[ Daniel Baumann ]
- * Consistently using '--force-confnew' as dpkg option when upgrading or installing packages.
+ * Consistently using '--force-confnew' as dpkg option when upgrading or
+ installing packages.
2017-04-01 Daniel Baumann <daniel.baumann@open-infrastructure.net>
@@ -81,7 +162,8 @@
[ Daniel Baumann ]
* Shortening file removal handling in uninstall target in makefile.
* Cleanup stray preseed.cfg removal.
- * Allowing @NAME@ variable in preseed files to allow for more flexibel preseed templating.
+ * Allowing @NAME@ variable in preseed files to allow for more flexibel
+ preseed templating.
* Allowing multiple container commands to be executed in a row.
* Adding support for bind-ro nspawn option for read-only bind mounts.
@@ -92,13 +174,17 @@
[ Daniel Baumann ]
* Updating year in copyright information for 2017.
* Adding -f, --force option in container auto command.
- * Adding net-tools in container-tools manpage to the list of packages to install.
+ * Adding net-tools in container-tools manpage to the list of packages to
+ install.
* Adding net-tools to required packages in host-setup documentation.
* Adding bash-completion for container auto command.
* Adding bash-completion for container move command.
* Adding bash-completion for container version command.
- * Using generic directory instead of local directory for debconf files to bash-complete container create command.
- * Reordering bash-completion to do completion the usual way (by suggesting commands first, then options and finally their arguments, rather than commands and arguments only).
+ * Using generic directory instead of local directory for debconf files
+ to bash-complete container create command.
+ * Reordering bash-completion to do completion the usual way (by
+ suggesting commands first, then options and finally their arguments,
+ rather than commands and arguments only).
2016-12-20 Daniel Baumann <daniel.baumann@open-infrastructure.net>
@@ -106,7 +192,8 @@
[ Daniel Baumann ]
* Fixing suffix in nwdiag output in container list command.
- * Handling unreadable container directory properly in container list command.
+ * Handling unreadable container directory properly in container list
+ command.
2016-12-10 Daniel Baumann <daniel.baumann@open-infrastructure.net>
@@ -125,12 +212,15 @@
* Adding container move manpage.
* Harmonizing markup of email addresses in manpages.
* Completing usage message in container list command.
- * Renaming internal show function in container list command for consistency.
+ * Renaming internal show function in container list command for
+ consistency.
* Adding trailing line in full format for container list command.
* Sorting format code in container list command.
* Renaming full format in container list command to cli for consistency.
- * Renaming short format in container list command to shell for consistency.
- * Removing half-finished multi-address handling in container list command.
+ * Renaming short format in container list command to shell for
+ consistency.
+ * Removing half-finished multi-address handling in container list
+ command.
* Adding CSV export format to container list command.
* Adding JSON export format to container list command.
* Adding nwdiag export format to container list command.
@@ -146,51 +236,64 @@
[ Daniel Baumann ]
* Adding note about configuration files in container manpage.
- * Logging some container actions in container program to /var/log/container-tools/container.log.
+ * Logging some container actions in container program to
+ /var/log/container-tools/container.log.
* Adding logrotate handling for /var/log/container-tools/container.log.
* Adding irc notification (opt-in).
- * Calling container programm in container-shell to trigger notifications too.
+ * Calling container programm in container-shell to trigger notifications
+ too.
2016-11-25 Daniel Baumann <daniel.baumann@open-infrastructure.net>
* Releasing version 20161122.
[ Daniel Baumann ]
- * Renaming too generic internal getopt variables to avoid possible collisions in the future.
- * Minimizing included packages by default in debconf container create script.
+ * Renaming too generic internal getopt variables to avoid possible
+ collisions in the future.
+ * Minimizing included packages by default in debconf container create
+ script.
2016-11-22 Daniel Baumann <daniel.baumann@open-infrastructure.net>
* Releasing version 20161122.
* Backward incompatible changes:
- - renaming curl cache directory from /var/cache/container-tools/curl to /var/cache/container-tools/images.
+ - renaming curl cache directory from /var/cache/container-tools/curl
+ to /var/cache/container-tools/images.
[ Daniel Baumann ]
* Adding runtime detection for http2 option in curl create script.
* Using curl with --fail option to abort in case of server/url errors.
* Updating contact section in manpages.
* Harmonizing manpage markup.
- * Adding --clean option to curl container create script to remove downloaded tarball from cache after successfull container creation.
- * Changing cache directory in curl create script from /var/cache/container-tools/curl to /var/cache/container-tools/images.
+ * Adding --clean option to curl container create script to remove
+ downloaded tarball from cache after successfull container creation.
+ * Changing cache directory in curl create script from
+ /var/cache/container-tools/curl to /var/cache/container-tools/images.
* Using https by default in container-images.sh example script.
* Adding sha512 verification to curl container create script.
- * Removing libui-dialog-perl from includes in debconf container create script.
+ * Removing libui-dialog-perl from includes in debconf container create
+ script.
2016-11-12 Daniel Baumann <daniel.baumann@open-infrastructure.net>
* Releasing version 20161112.
* Backward incompatible changes:
- - removes support to create Debian 8 (jessie) container in debconf container create script.
+ - removes support to create Debian 8 (jessie) container in debconf
+ container create script.
[ Daniel Baumann ]
- * Removing support for Debian 9 (jessie) in debconf container create script.
+ * Removing support for Debian 9 (jessie) in debconf container create
+ script.
* Adding shortcuts for container commands to bash-completion as well.
* Ignoring symlinks as container commands in bash-completion.
* Adding container version to ver symlink.
* Updating development section in container-tools manpage.
- * Avoid repeating ipv4 address of the previous container in container list command.
- * Using fallback to ifupdown addresses in container list command for container not using networkd yet.
- * Fail to find container in remove command only when both the rootfs and the config are gone already.
+ * Avoid repeating ipv4 address of the previous container in container
+ list command.
+ * Using fallback to ifupdown addresses in container list command for
+ container not using networkd yet.
+ * Fail to find container in remove command only when both the rootfs and
+ the config are gone already.
* Correcting syntax in usage message of container create scripts.
* Adding initial curl container create script.
@@ -209,9 +312,12 @@
* Replacing README.txt with a copy of container-tools.7 manpage.
* Installing README.txt into documentation directory.
* Installing all generic text files as documentation.
- * Adding mandatory inclusion of /etc/network/interfaces.d files in host-setup documentation, thanks to Richard Nelson <unixabg@gmail.com>.
+ * Adding mandatory inclusion of /etc/network/interfaces.d files in
+ host-setup documentation, thanks to Richard Nelson
+ <unixabg@gmail.com>.
* Using systemd-networkd in container instead of ifupdown.
- * Updating container list command to use systemd-networkd config instead of ifupdown.
+ * Updating container list command to use systemd-networkd config instead
+ of ifupdown.
* Excluding symlinks in container-shell command list.
* Adding container list to ls symlink.
* Adding container remove to rm symlink.
@@ -221,24 +327,32 @@
* Releasing version 20161101.
[Daniel Baumann]
- * Changing installation of systemd support packages to workaround systemd-shim failures in debootstrap.
+ * Changing installation of systemd support packages to workaround
+ systemd-shim failures in debootstrap.
* Correcting installation location for documentation in makefile.
- * Adding note about help for individual commands in container-shell program.
+ * Adding note about help for individual commands in container-shell
+ program.
* Using sudo in container-shell.
* Setting LC_ALL in container-shell.
- * Switching from ftp.debian.org as default debian mirror to deb.debian.org in debconf script.
- * Removing obsolete configuration for broadcast in interfaces of debconf container create script.
- * Removing obsolete configuration for network in interfaces of debconf container create script.
+ * Switching from ftp.debian.org as default debian mirror to
+ deb.debian.org in debconf script.
+ * Removing obsolete configuration for broadcast in interfaces of debconf
+ container create script.
+ * Removing obsolete configuration for network in interfaces of debconf
+ container create script.
* Removing obsolete network configurations in host-setup documentation.
* Switching default distribution to stretch in container create scripts.
- * Replacing support for Progress Linux 3 (cairon) with Progress Linux 4 (dschinn).
- * Automatically adding restricted archive areas for progress-linux extras repositories if non-free is enabled.
+ * Replacing support for Progress Linux 3 (cairon) with Progress Linux 4
+ (dschinn).
+ * Automatically adding restricted archive areas for progress-linux
+ extras repositories if non-free is enabled.
* Updating progress-linux archive-key filenames.
* Removing container enter command for LTS version.
* Removing container limit command for LTS version.
* Removing -f|--force option in container stop command for LTS version.
* Removing container rename command for LTS version.
- * Correcting IP address in documentation of a network configuration example.
+ * Correcting IP address in documentation of a network configuration
+ example.
* Updating known limitations in README file.
* Updating known limitations in container-tools manpage.
* Improving language of preseed question in debconf script.
@@ -251,19 +365,23 @@
[ Daniel Baumann ]
* Adding commit messages to previous changelog.
* Trimming usage example to basic commands only in readme file.
- * Trimming usage example to basic commands only in container-tools manpage.
+ * Trimming usage example to basic commands only in container-tools
+ manpage.
* Adding reference to container-status command in container manpage.
* Updating name in container-status manpage.
* Dropping lxc ignore in container list command.
- * Adding hooks directory for pre and post execution of container commands.
+ * Adding hooks directory for pre and post execution of container
+ commands.
[ Simon Spöhel ]
* Changing container-status command to always show full output.
[ Daniel Baumann ]
* Adding host system based overlay mounts.
- * Adding error message in container start command if container is locked.
- * Adding -f, --force option to container start command to remove stray lock files.
+ * Adding error message in container start command if container is
+ locked.
+ * Adding -f, --force option to container start command to remove stray
+ lock files.
* Adding container-nsenter program for container enter command.
* Calling container-nsenter program from container enter command.
* Sorting container configuration file.
@@ -277,8 +395,10 @@
[ Daniel Baumann ]
* Showing only local containers by default in container list command.
* Adding container enter command.
- * Creating non-existing source directory for bind mounts automatically in container start command.
- * Harmonizing defintions of long and short options in getopt code of container commands.
+ * Creating non-existing source directory for bind mounts automatically
+ in container start command.
+ * Harmonizing defintions of long and short options in getopt code of
+ container commands.
* Adding container rename command.
* Updating references to bug tracking system.
* Updating Git URL in installation instructions.
@@ -288,25 +408,34 @@
* Correcting container list manpage.
* Adding bash-completion for container enter command.
* Updating bash-completion for container list command.
- * Updating bash-completion for format parameter in container list command.
+ * Updating bash-completion for format parameter in container list
+ command.
* Updating bash-completion for container remove command.
[ Daniel Baumann ]
- * Using tabs instead of spaces for indentation in container bash-completion.
+ * Using tabs instead of spaces for indentation in container
+ bash-completion.
* Harmonizing head comments in container bash-completion.
- * Looking up container create scripts dynamically in container bash-completion.
+ * Looking up container create scripts dynamically in container
+ bash-completion.
* Correcting local commands extraction in container bash-completion.
- * Correcting bind mount directory creation in container create command to work with multiple directories at once.
- * Correcting bind mount directory removal in container remove command to work with multiple directories at once.
- * Using global path definition in container create command for consistency.
- * Using global path definition in container version command for consistency.
- * Always writing cnt.auto= default values to configuration files in debconf container create script.
+ * Correcting bind mount directory creation in container create command
+ to work with multiple directories at once.
+ * Correcting bind mount directory removal in container remove command to
+ work with multiple directories at once.
+ * Using global path definition in container create command for
+ consistency.
+ * Using global path definition in container version command for
+ consistency.
+ * Always writing cnt.auto= default values to configuration files in
+ debconf container create script.
* Adding asciicast introduction.
* Updating depends to install in readme file.
* Updating depends to install in container-tools manpage.
* Adding section about known limitations to readme file.
* Adding section about known limitations to container-tools manpage.
- * Creating machines directory in container create scripts if it's not already existing.
+ * Creating machines directory in container create scripts if it's not
+ already existing.
[ Philipp Plüss ]
* Correcting spelling typo in HOST-SETUP.txt.
@@ -331,18 +460,25 @@
* Updating vcs links in container-tools manpage.
* Making makefile more generic.
* Completing cleanup of directories in makefile uninstall target.
- * Silencing error message in container list command if machine directory is not readable.
- * Excluding container-tools and .container-tools in /var/lib/machines as special directories to allow all container-tools ressources to be places on shared storage.
+ * Silencing error message in container list command if machine directory
+ is not readable.
+ * Excluding container-tools and .container-tools in /var/lib/machines as
+ special directories to allow all container-tools ressources to be
+ places on shared storage.
[ Andreas Kreuzer ]
* Correcting limit manpage namespace.
[ Daniel Baumann ]
- * Correcting container list command to list container without IP adresses.
+ * Correcting container list command to list container without IP
+ adresses.
* Correcting aligning in container list command.
* Showing local containers in container list command only.
- * Including apt-transport-https in default package selection of progress-linux container create script.
- * Including systemd-sysv in default package selection of progress-linux container create script to prevent pulling in systemd-shim and cgmanager.
+ * Including apt-transport-https in default package selection of
+ progress-linux container create script.
+ * Including systemd-sysv in default package selection of progress-linux
+ container create script to prevent pulling in systemd-shim and
+ cgmanager.
* Switching default entries for cdn.archive.progress-linux.org to HTTPS.
* Using UTF-8 symbols for container status.
@@ -362,10 +498,13 @@
* Adding bind option to bind mount directories in debconf script.
* Adding bind field in debconf cairon-backports example preseed file.
* Mounting bind mounts for the duration of the debconf script.
- * Removing empty source directory of bind mounts in container stop command.
- * Using safety measures of rm when removing containers because of (potentially) active bind mounts.
+ * Removing empty source directory of bind mounts in container stop
+ command.
+ * Using safety measures of rm when removing containers because of
+ (potentially) active bind mounts.
* Correcting cleanup of temporary debconf files in debconf script.
- * Guessing default container script from /usr/share/container-tools/scripts/default symlink (if existing).
+ * Guessing default container script from
+ /usr/share/container-tools/scripts/default symlink (if existing).
* Using .cfg suffix for preseed files of debconf script for consistency.
* Adding auto option to set automatic start in debconf script.
* Adding auto field in debconf cairon-backports example preseed file.
@@ -394,21 +533,30 @@
new: cnt.auto=true|FQDN
[ Nik Lutz ]
- * Fixing path argument of chmod for .container-command script in the debconf script.
- * Using systemd to cleanup network interfaces after the container has been stopped.
+ * Fixing path argument of chmod for .container-command script in the
+ debconf script.
+ * Using systemd to cleanup network interfaces after the container has
+ been stopped.
* Using systemctl to start containers.
* Swaping parsing order of NETWORK_VETH_EXTRA and NETWORK_BRIDGES.
- * Replacing systemd-nspawn '--network-bridge=' with one config file per interface in /etc/network/interfaces.d.
- * Using eth[0-9] instead of host[0-9] in containers /etc/network/interface.
- * Removing network interface configuration in /etc/network/interfaces.d after container stop.
- * Using systemd-nspawn '--network-veth-extra=' instead of '--network-veth' (prerequisite for multiple network interface support per container).
- * Adding veth name (cnt-debconf/network[0-9]/veth) configuration option to debconf script.
+ * Replacing systemd-nspawn '--network-bridge=' with one config file per
+ interface in /etc/network/interfaces.d.
+ * Using eth[0-9] instead of host[0-9] in containers
+ /etc/network/interface.
+ * Removing network interface configuration in /etc/network/interfaces.d
+ after container stop.
+ * Using systemd-nspawn '--network-veth-extra=' instead of
+ '--network-veth' (prerequisite for multiple network interface support
+ h per container).
+ * Adding veth name (cnt-debconf/network[0-9]/veth) configuration option
+ to debconf script.
[ Daniel Baumann ]
* Adjusting output of additional IP addresses in container list command.
* Correcting typo in debconf jessie example preseed file.
* Adding veth field in debconf cairon-backports example preseed file.
- * Removing screen session handling in container-autostart program, containers start in background by default now.
+ * Removing screen session handling in container-autostart program,
+ containers start in background by default now.
* Reworking container-autostart program into container auto command.
2016-05-01 Daniel Baumann <daniel.baumann@open-infrastructure.net>
@@ -417,7 +565,8 @@
[ Daniel Baumann ]
* Correcting spelling error in changelog file.
- * Excluding snapshot directories for cephfs and netapp in container list command.
+ * Excluding snapshot directories for cephfs and netapp in container list
+ command.
* Adding short and full list format to container list command.
* Adding exit alias for logout in container-shell program.
* Correcting Debian stretch version number in container-tools manpage.
@@ -429,27 +578,35 @@
* Releasing version 20160415.
* Backward incompatible changes:
- - container stop command option -k|--kill renamed to -f|--force for consistency
+ - container stop command option -k|--kill renamed to -f|--force for
+ consistency
[ Daniel Baumann ]
- * Removing hardcoded container reference when opening manpages in container-shell help.
+ * Removing hardcoded container reference when opening manpages in
+ container-shell help.
* Using logout only to exit container-shell.
* Adding start note about logout to container-shell.
* Completing output of container-shell help command.
- * Avoid aborting container-shell help command if no manpage is available.
+ * Avoid aborting container-shell help command if no manpage is
+ available.
* Adding container-shell about command.
- * Adding notes about container-shell specific commands in container-shell manpage.
+ * Adding notes about container-shell specific commands in
+ container-shell manpage.
* Updating container-shell start message.
* Overwriting existing symlinks in makefiles install target.
* Adding extra empty line before each command output in container-shell.
* Updating apt comandline in installation instructions.
* Dropping unused syslog.target from container-autostart.service file.
* Excluding lost+found directory in container list command.
- * Creating container program shortcut symlinks in makefile instead of keeping them in the sources.
- * Creating container script shortcut symlinks in makefile instead of keeping them in the sources.
+ * Creating container program shortcut symlinks in makefile instead of
+ keeping them in the sources.
+ * Creating container script shortcut symlinks in makefile instead of
+ keeping them in the sources.
* Adding manpage symlinks for container script shortcut symlinks.
- * Renaming container stop command option -k, --kill to -f, --force for consistency.
- * Switching from httpredir.debian.org as default debian mirror to ftp.debian.org in debconf script.
+ * Renaming container stop command option -k, --kill to -f, --force for
+ consistency.
+ * Switching from httpredir.debian.org as default debian mirror to
+ ftp.debian.org in debconf script.
2016-04-01 Daniel Baumann <daniel.baumann@open-infrastructure.net>
@@ -465,7 +622,8 @@
* Adding blockio, cpu, memory and tasks limit config options.
* Adding debconf script.
* Updating year in copyright notices in container commands.
- * Making removal message and answer handling of container remove command more userfriendly.
+ * Making removal message and answer handling of container remove command
+ more userfriendly.
* Adding documentation about host setup.
* Correcting spelling in readme.
* Adding notes about installation to readme file.
@@ -481,8 +639,10 @@
* Correcting spelling in container program manpages.
* Adding notes about installation to container-tools manpage.
* Adding notes about development to container-tools manpage.
- * Updating wording about Debian and Debian based containers in container-create-* manpages.
- * Updating wording about Debian and Debian based containers in jessie example file.
+ * Updating wording about Debian and Debian based containers in
+ container-create-* manpages.
+ * Updating wording about Debian and Debian based containers in jessie
+ example file.
* Updating container-tools description in readme file.
* Updating container-tools description in manpages.
diff --git a/README.txt b/README.txt
new file mode 100644
index 0000000..5229136
--- /dev/null
+++ b/README.txt
@@ -0,0 +1,108 @@
+NAME
+----
+container-tools - Manage systemd-nspawn containers
+
+
+DESCRIPTION
+-----------
+"[A Linux container] is an operating-system-level virtualization environment for running multiple isolated Linux systems (containers) on a single Linux control host."::
+ -- Wikipedia (https://en.wikipedia.org/wiki/LXC)
+
+container-tools provides the system integration for managing containers using systemd-nspawn.
+
+
+DOWNLOAD
+--------
+ * Upstream Releases: https://files.open-infrastructure.net/software/container-tools/upstream
+ * Upstream Sources: https://sources.open-infrastructure.net/software/container-tools
+ * Debian Releases: https://files.open-infrastructure.net/software/container-tools/debian
+ * Debian Sources: https://sources.progress-linux.org/users/daniel/debian/packages/open-infrastructure-container-tools
+
+
+INSTALLATION
+------------
+
+SOURCE
+~~~~~~
+ 1. sudo apt install asciidoc git docbook-xml docbook-xsl libxml2-utils make xsltproc dbus systemd-container net-tools
+ 2. git clone https://sources.open-infrastructure.net/software/container-tools
+ 3. cd container-tools && sudo make install
+
+DEBIAN 9 (STRETCH) AND NEWER
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ * sudo apt install container-tools
+
+
+DEVELOPMENT
+-----------
+Bug reports, feature requests, help, patches, support and everything else
+are welcome on the Open Infrastructure Software Mailing List:
+
+ * https://lists.open-infrastructure.net/listinfo/software
+
+Please base patches against the 'next' Git branch using common sense:
+
+ * https://www.kernel.org/doc/Documentation/SubmittingPatches
+
+Debian specific bugs can also be reported in the Debian Bug Tracking System:
+
+ * https://bugs.debian.org
+
+
+KNOWN LIMITATIONS
+-----------------
+ * This version of container-tools currently do not work with systemd-networkd and depend on ifupdown.
+ * Using overlay, the upper directory can not be an NFS mount due to limitations in Linux' overlay filesystem,
+ see https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/filesystems/overlayfs.txt
+
+
+USAGE
+-----
+*Create a new container:*::
+ sudo container create -n NAME
+
+*Start a container:*::
+ sudo container start -n NAME
+
+*Stop a container:*::
+ sudo container stop -n NAME
+
+*Remove a container:*::
+ sudo container remove -n NAME
+
+*List container on the system:*::
+ sudo container list
+
+*Show container-tools version:*::
+ container version
+
+See container(1) for a list of all container commands.
+
+
+LINKS
+-----
+*2016-02-24: Systemd vs. Docker*::
+ https://lwn.net/Articles/676831/
+
+*2015-06-10: Systemd and containers*::
+ https://lwn.net/Articles/647634/
+
+*2014-07-07: Control groups*::
+ https://lwn.net/Articles/604609/
+
+*2013-11-13: Systemd-Nspawn is Chroot on Steroids [LinuxCon Europe]*::
+ https://www.youtube.com/watch?v=s7LlUs5D9p4
+
+*2013-11-03: Creating containers with systemd-nspawn*::
+ https://lwn.net/Articles/572957/
+
+*2013-02-06: Systemd lightweight containers*::
+ https://lwn.net/Articles/536033/
+
+*2013-01-04: Namespaces in operation*::
+ https://lwn.net/Articles/531114/
+
+
+AUTHORS
+-------
+ * Daniel Baumann <daniel.baumann@open-infrastructure.net>
diff --git a/VERSION.txt b/VERSION.txt
index 454d1fc..01f7081 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -1 +1 @@
-20170701
+20170722
diff --git a/bin/container-shell b/bin/container-shell
index 38a9ab9..4903465 100755
--- a/bin/container-shell
+++ b/bin/container-shell
@@ -63,9 +63,23 @@ Shell ()
echo
cd "/usr/lib/${SOFTWARE}/${PROGRAM}"
- find . -type f -printf "%f\n" | sort
+ find . -type f -printf " %f\n" | sort
cd "${OLDPWD}"
+ if [ -n "${CONTAINER_COMMANDS_ENABLE}" ]
+ then
+ echo
+ echo "The following container commands are enabled for the current user:"
+ echo " ${CONTAINER_COMMANDS_ENABLE}"
+ fi
+
+ if [ -n "${CONTAINER_COMMANDS_DISABLE}" ]
+ then
+ echo
+ echo "The following container commands are disabled for the current user:"
+ echo " ${CONTAINER_COMMANDS_DISABLE}"
+ fi
+
echo
echo "Use 'help COMMAND' for more information."
diff --git a/lib/container/key b/lib/container/key
new file mode 100755
index 0000000..e97d8e1
--- /dev/null
+++ b/lib/container/key
@@ -0,0 +1,149 @@
+#!/bin/sh
+
+# container-tools - Manage systemd-nspawn containers
+# Copyright (C) 2014-2017 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/>.
+
+set -e
+
+COMMAND="$(basename ${0})"
+
+KEYS="/etc/container-tools/keys"
+
+Parameters ()
+{
+ GETOPT_LONGOPTIONS="add:,list,remove:,"
+ GETOPT_OPTIONS="a:,l,r:,"
+
+ PARAMETERS="$(getopt --longoptions ${GETOPT_LONGOPTIONS} --name=${COMMAND} --options ${GETOPT_OPTIONS} --shell sh -- ${@})"
+
+ if [ "${?}" != "0" ]
+ then
+ echo "'${COMMAND}': getopt exit" >&2
+ exit 1
+ fi
+
+ eval set -- "${PARAMETERS}"
+
+ while true
+ do
+ case "${1}" in
+ -a|--add)
+ ADD="${2}"
+ ACTION="add"
+ shift 2
+ ;;
+
+ -l|--list)
+ ACTION="list"
+ shift 1
+ ;;
+
+ -r|--remove)
+ REMOVE="${2}"
+ ACTION="remove"
+ shift 2
+ ;;
+
+ --)
+ shift 1
+ break
+ ;;
+
+ *)
+ echo "'${COMMAND}': getopt error" >&2
+ exit 1
+ ;;
+ esac
+ done
+}
+
+Usage ()
+{
+ echo "Usage: container ${COMMAND} [-a|--add KEY] [-l|--list] [-r|--remove KEY]" >&2
+ exit 1
+}
+
+Parameters "${@}"
+
+if [ -z "${ACTION}" ]
+then
+ Usage
+fi
+
+# Pre hooks
+for FILE in "${HOOKS}/pre-${COMMAND}".* "${HOOKS}/${NAME}.pre-${COMMAND}"
+do
+ if [ -x "${FILE}" ]
+ then
+ "${FILE}"
+ fi
+done
+
+# Run
+if [ ! -e "${KEYS}" ]
+then
+ mkdir -p "${KEYS}"
+
+ chown root:root "${KEYS}"
+ chmod 0700 "${KEYS}"
+
+cat > "${KEYS}/gnupg.conf" << EOF
+keyserver hkps://hkps.pool.sks-keyservers.net
+keyserver-options include-revoked
+keyserver-options no-honor-keyserver-url
+
+cert-digest-algo SHA512
+default-preference-list SHA512 SHA384 SHA256 SHA224 AES256 AES192 AES ZLIB ZIP Uncompressed
+personal-cipher-preferences AES256 AES192 AES
+personal-compress-preferences ZLIB ZIP Uncompressed
+personal-digest-preferences SHA512 SHA384 SHA256 SHA224
+
+no-comments
+no-emit-version
+no-greeting
+keyid-format 0xlong
+list-options show-keyring
+list-options show-uid-validity
+verify-options show-uid-validity
+with-fingerprint
+
+charset utf-8
+EOF
+
+fi
+
+case "${ACTION}" in
+ add)
+ gpg --homedir "${KEYS}" --import "${ADD}"
+ ;;
+
+ list)
+ gpg --homedir "${KEYS}" --list-keys
+ ;;
+
+ remove)
+ gpg --homedir "${KEYS}" --delete-keys "${REMOVE}"
+ ;;
+esac
+
+# Post hooks
+for FILE in "${HOOKS}/post-${COMMAND}".* "${HOOKS}/${NAME}.post-${COMMAND}"
+do
+ if [ -x "${FILE}" ]
+ then
+ "${FILE}"
+ fi
+done
diff --git a/lib/container/limit b/lib/container/limit
index b888656..05bffdc 100755
--- a/lib/container/limit
+++ b/lib/container/limit
@@ -25,7 +25,7 @@ MACHINES="/var/lib/machines"
Parameters ()
{
- GETOPT_LONGOPTIONS="name:,blockio-device-weight:,blockio-read-bandwith:,blockio-weight:,blockio-write-bandwith:,cpu-quota:,cpu-shares:,memory-limit:,tasks-max:,"
+ GETOPT_LONGOPTIONS="name:,blockio-device-weight:,blockio-read-bandwidth:,blockio-weight:,blockio-write-bandwidth:,cpu-quota:,cpu-shares:,memory-limit:,tasks-max:,"
GETOPT_OPTIONS="n:b:c:m:t:,"
PARAMETERS="$(getopt --longoptions ${GETOPT_LONGOPTIONS} --name=${COMMAND} --options ${GETOPT_OPTIONS} --shell sh -- ${@})"
@@ -71,8 +71,8 @@ Parameters ()
shift 2
;;
- --blockio-read-bandwith)
- BLOCK_IO_READ_BANDWITH="${2}"
+ --blockio-read-bandwidth)
+ BLOCK_IO_READ_BANDWIDTH="${2}"
shift 2
;;
@@ -81,8 +81,8 @@ Parameters ()
shift 2
;;
- --blockio-write-bandwith)
- BLOCK_IO_WRITE_BANDWITH="${2}"
+ --blockio-write-bandwidth)
+ BLOCK_IO_WRITE_BANDWIDTH="${2}"
shift 2
;;
@@ -101,7 +101,7 @@ Parameters ()
Usage ()
{
- echo "Usage: container ${COMMAND} -n|--name NAME [--blockio-device-weight \"DEVICE WEIGHT\"] [--blockio-read-bandwith \"DEVICE BYTES\"] [-b|--blockio-weight WEIGHT] [--blockio-write-bandwith \"DEVICE BYTES\"] [-c|--cpu-quota QUOTA] [--cpu-shares SHARES] [-m|--memory-limit BYTES] [-t|--tasks-max NUMBER]" >&2
+ echo "Usage: container ${COMMAND} -n|--name NAME [--blockio-device-weight \"DEVICE WEIGHT\"] [--blockio-read-bandwidth \"DEVICE BYTES\"] [-b|--blockio-weight WEIGHT] [--blockio-write-bandwidth \"DEVICE BYTES\"] [-c|--cpu-quota QUOTA] [--cpu-shares SHARES] [-m|--memory-limit BYTES] [-t|--tasks-max NUMBER]" >&2
exit 1
}
@@ -136,9 +136,9 @@ then
SET_PROPERTY="true"
fi
-if [ -n "${BLOCK_IO_READ_BANDWITH}" ]
+if [ -n "${BLOCK_IO_READ_BANDWIDTH}" ]
then
- BLOCK_IO_READ_BANDWITH="BlockIOReadBandwidth=${BLOCK_IO_READ_BANDWITH}"
+ BLOCK_IO_READ_BANDWIDTH="BlockIOReadBandwidth=${BLOCK_IO_READ_BANDWIDTH}"
SET_PROPERTY="true"
fi
@@ -148,9 +148,9 @@ then
SET_PROPERTY="true"
fi
-if [ -n "${BLOCK_IO_WRITE_BANDWITH}" ]
+if [ -n "${BLOCK_IO_WRITE_BANDWIDTH}" ]
then
- BLOCK_IO_WRITE_BANDWITH="BlockIOReadBandwidth=${BLOCK_IO_WRITE_BANDWITH}"
+ BLOCK_IO_WRITE_BANDWIDTH="BlockIOReadBandwidth=${BLOCK_IO_WRITE_BANDWIDTH}"
SET_PROPERTY="true"
fi
@@ -193,7 +193,7 @@ do
done
# Run
-systemctl --runtime set-property ${NAME} ${BLOCK_IO_DEVICE_WEIGHT} ${BLOCK_IO_READ_BANDWITH} ${BLOCK_IO_WEIGHT} ${BLOCK_IO_WRITE_BANDWITH} ${CPU_QUOTA} ${CPU_SHARES} ${MEMORY_LIMIT} ${TASKS_MAX}
+systemctl --runtime set-property ${NAME} ${BLOCK_IO_DEVICE_WEIGHT} ${BLOCK_IO_READ_BANDWIDTH} ${BLOCK_IO_WEIGHT} ${BLOCK_IO_WRITE_BANDWIDTH} ${CPU_QUOTA} ${CPU_SHARES} ${MEMORY_LIMIT} ${TASKS_MAX}
# Post hooks
for FILE in "${HOOKS}/post-${COMMAND}".* "${HOOKS}/${NAME}.post-${COMMAND}"
diff --git a/lib/container/start b/lib/container/start
index 88f2ea6..6d2c7a9 100755
--- a/lib/container/start
+++ b/lib/container/start
@@ -308,6 +308,11 @@ then
NETWORK_VETH_EXTRA="${NETWORK_VETH_EXTRA} --network-veth-extra=${VETH}"
INTERFACE="$(echo ${VETH} | awk -F: '{ print $1 }')"
+ if [ "$(echo ${INTERFACE} | wc -c)" -gt 15 ]
+ then
+ echo "'${INTERFACE}': name exceeds maximum of 15 characters, network might be not working."
+ fi
+
cat > "/etc/network/interfaces.d/${INTERFACE}" << EOF
allow-hotplug ${INTERFACE}
iface ${INTERFACE} inet manual
@@ -331,6 +336,11 @@ EOF
INTERFACE="$(echo ${BRIDGE_DEFINITION} | awk -F: '{ print $1 }')"
BRIDGE="$(echo ${BRIDGE_DEFINITION} | awk -F: '{ print $2 }')"
+ if [ "$(echo ${INTERFACE} | wc -c)" -gt 15 ]
+ then
+ echo "'${INTERFACE}': name exceeds maximum of 15 characters, network might be not working."
+ fi
+
if [ -n "${BRIDGE}" ] && [ -n "${INTERFACE}" ]
then
@@ -382,11 +392,11 @@ EOF
SET_PROPERTY="true"
fi
- BLOCK_IO_READ_BANDWITH="$(awk -F= '/^BlockIOReadBandwith=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+ BLOCK_IO_READ_BANDWIDTH="$(awk -F= '/^BlockIOReadBandwidth=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
- if [ -n "${BLOCK_IO_READ_BANDWITH}" ]
+ if [ -n "${BLOCK_IO_READ_BANDWIDTH}" ]
then
- BLOCK_IO_READ_BANDWITH="BlockIOReadBandwith=${BLOCK_IO_READ_BANDWITH}"
+ BLOCK_IO_READ_BANDWIDTH="BlockIOReadBandwidth=${BLOCK_IO_READ_BANDWIDTH}"
SET_PROPERTY="true"
fi
@@ -398,11 +408,11 @@ EOF
SET_PROPERTY="true"
fi
- BLOCK_IO_WRITE_BANDWITH="$(awk -F= '/^BlockIOWriteBandwith=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
+ BLOCK_IO_WRITE_BANDWIDTH="$(awk -F= '/^BlockIOWriteBandwidth=/ { print $2 }' ${CONFIG}/${NAME}.conf)"
- if [ -n "${BLOCK_IO_WRITE_BANDWITH}" ]
+ if [ -n "${BLOCK_IO_WRITE_BANDWIDTH}" ]
then
- BLOCK_IO_WRITE_BANDWITH="BlockIOWriteBandwith=${BLOCK_IO_WRITE_BANDWITH}"
+ BLOCK_IO_WRITE_BANDWIDTH="BlockIOWriteBandwidth=${BLOCK_IO_WRITE_BANDWIDTH}"
SET_PROPERTY="true"
fi
@@ -451,7 +461,7 @@ case "${START}" in
true)
case "${SET_PROPERTY}" in
true)
- systemctl --runtime set-property ${NAME} ${BLOCK_IO_DEVICE_WEIGHT} ${BLOCK_IO_READ_BANDWITH} ${BLOCK_IO_WEIGHT} ${BLOCK_IO_WRITE_BANDWITH} ${CPU_QUOTA} ${CPU_SHARES} ${MEMORY_LIMIT} ${TASKS_MAX}
+ systemctl --runtime set-property ${NAME} ${BLOCK_IO_DEVICE_WEIGHT} ${BLOCK_IO_READ_BANDWIDTH} ${BLOCK_IO_WEIGHT} ${BLOCK_IO_WRITE_BANDWIDTH} ${CPU_QUOTA} ${CPU_SHARES} ${MEMORY_LIMIT} ${TASKS_MAX}
;;
esac
;;
diff --git a/share/bash-completion/container b/share/bash-completion/container
index 8847419..ffa042d 100644
--- a/share/bash-completion/container
+++ b/share/bash-completion/container
@@ -2,6 +2,7 @@
#
# container-tools - Manage systemd-nspawn containers
# Copyright (C) 2016 Andreas Kreuzer <andreas.kreuzer@open-infrastructure.net>
+# Copyright (C) 2016-2017 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
@@ -96,6 +97,12 @@ _container()
esac
;;
+ key)
+ opts="-a --add -l --list -r --remove"
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+
limit)
case "${prev}" in
-n|--name)
@@ -105,7 +112,7 @@ _container()
;;
*)
- opts="-n --name --blockio-device-weight --blockio-read-bandwith -b --blockio-weight --blockio-write-bandwith -c --cpu-quota --cpu-shares -m --memory-limit -t --tasks-max"
+ opts="-n --name --blockio-device-weight --blockio-read-bandwidth -b --blockio-weight --blockio-write-bandwidth -c --cpu-quota --cpu-shares -m --memory-limit -t --tasks-max"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
;;
diff --git a/share/doc/HOST-SETUP.txt b/share/doc/HOST-SETUP.txt
index 72d42d5..e172ee3 100644
--- a/share/doc/HOST-SETUP.txt
+++ b/share/doc/HOST-SETUP.txt
@@ -52,11 +52,11 @@ source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
-iface eth0 inet manual
+iface eno1 inet manual
-allow-hotplug br0
-iface br0 inet dhcp
- bridge_ports eth0
+allow-hotplug bridge0
+iface bridge0 inet dhcp
+ bridge_ports eno1
bridge_fd 0
bridge_maxwait 0
bridge_stp 0
@@ -74,18 +74,18 @@ source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
-iface eth0 inet manual
+iface eno1 inet manual
-allow-hotplug br0
-iface br0 inet static
+allow-hotplug bridge0
+iface bridge0 inet static
address 10.0.0.2
gateway 10.0.0.1
netmask 255.255.255.0
- pre-up ifconfig eth0 down
- pre-up ifconfig eth0 up
+ pre-up ifconfig eno1 down
+ pre-up ifconfig eno1 up
- bridge_ports eth0
+ bridge_ports eno1
bridge_fd 0
bridge_maxwait 0
bridge_stp 0
@@ -103,16 +103,16 @@ source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
-allow-hotplug eth0
-iface eth0 inet dhcp
+allow-hotplug eno1
+iface eno1 inet dhcp
-allow-hotplug br0
-iface br0 inet static
+allow-hotplug bridge0
+iface bridge0 inet static
address 10.0.0.1
netmask 255.255.255.0
- pre-up brctl addbr br0
- post-down brctl delbr br0
+ pre-up brctl addbr bridge0
+ post-down brctl delbr bridge0
bridge_fd 0
bridge_maxwait 0
@@ -131,19 +131,19 @@ source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
-allow-hotplug eth0
-iface eth0 inet dhcp
+allow-hotplug eno1
+iface eno1 inet dhcp
-iface eth1 inet manual
+iface eno2 inet manual
-iface eth2 inet manual
+iface eno3 inet manual
allow-hotplug bond0
iface bond0 inet manual
up ifconfig bond0 0.0.0.0 up
down ifconfig bond0 down
- slaves eth1 eth2
+ slaves eno2 eno3
bond-mode 4
bond-miimon 100
diff --git a/share/doc/examples/container-images.sh b/share/doc/examples/container-images.sh
index b743f57..07f3451 100755
--- a/share/doc/examples/container-images.sh
+++ b/share/doc/examples/container-images.sh
@@ -3,7 +3,7 @@
# container-tools - Manage systemd-nspawn containers
#
# Description: example for automated Debian base system container image creation
-# Requires: debootstrap xz-utils
+# Requires: debootstrap plzip xz-utils
# Usage: sudo ./container-images.sh
set -e
@@ -13,25 +13,54 @@ DISTRIBUTIONS="stretch sid"
MIRROR="https://deb.debian.org/debian"
INCLUDE="dbus"
-DATE="$(date +%Y%m%d)"
+COMPRESSIONS="gz lz xz"
+
+VERSION="$(date +%Y%m%d)"
for DISTRIBUTION in ${DISTRIBUTIONS}
do
for ARCHITECTURE in ${ARCHITECTURES}
do
- SOURCE="debian-${DISTRIBUTION}-${ARCHITECTURE}_${DATE}"
- TARGET="debian-${DISTRIBUTION}-${ARCHITECTURE}"
+ SYSTEM="debian-${DISTRIBUTION}-${VERSION}_${ARCHITECTURE}"
+
+ debootstrap --arch=${ARCHITECTURE} --include=${INCLUDE} ${DISTRIBUTION} ${SYSTEM} ${MIRROR}
+ chroot "${SYSTEM}" apt-get clean
+
+ rm -f "${SYSTEM}/etc/apt/apt.conf.d/01autoremove-kernels"
+ rm -f "${SYSTEM}/etc/hostname"
+ echo "" > "${SYSTEM}/etc/machine-id"
+ rm -f "${SYSTEM}/etc/resolv.conf"
+ rm -f "${SYSTEM}/var/lib/systemd/catalog/database"
+
+ for COMPRESSION in ${COMPRESSIONS}
+ do
+ case "${COMPRESSION}" in
+ gz)
+ TAR_OPTIONS="--gzip"
+ ;;
+
+ lz)
+ TAR_OPTIONS="--lzip"
+ ;;
+
+ xz)
+ TAR_OPTIONS="--xz"
+ ;;
+ esac
+
+ echo "Creating ${SYSTEM}.system.tar.${COMPRESSION}"
+ tar ${TAR_OPTIONS} -cf "${SYSTEM}.system.tar.${COMPRESSION}" "${SYSTEM}"
+
+ echo "Creating ${SYSTEM}.system.tar.${COMPRESSION}.sha512"
+ sha512sum "${SYSTEM}.system.tar.${COMPRESSION}" > "${SYSTEM}.system.tar.${COMPRESSION}.sha512"
- debootstrap --arch=${ARCHITECTURE} --include=${INCLUDE} ${DISTRIBUTION} ${SOURCE} ${MIRROR}
- chroot "${SOURCE}" apt-get clean
+ echo "Creating ${SYSTEM}.system.tar.${COMPRESSION} symlink"
+ ln -sf "${SYSTEM}.system.tar.${COMPRESSION}" "$(echo ${SYSTEM}.system.tar.${COMPRESSION} | sed -e "s|${VERSION}|current|")"
- rm -f "${SOURCE}/etc/apt/apt.conf.d/01autoremove-kernels"
- rm -f "${SOURCE}/etc/hostname"
- echo "" > "${SOURCE}/etc/machine-id"
- rm -f "${SOURCE}/etc/resolv.conf"
- rm -f "${SOURCE}/var/lib/systemd/catalog/database"
+ echo "Creating ${SYSTEM}.system.tar.${COMPRESSION}.sha512 copy"
+ sed -e "s|${VERSION}|current|" "${SYSTEM}.system.tar.${COMPRESSION}.sha512" > "$(echo ${SYSTEM}.system.tar.${COMPRESSION}.sha512 | sed -e "s|${VERSION}|current|")"
+ done
- echo "Creating ${TARGET}.tar.xz"
- tar cfJ "${TARGET}.tar.xz" "${SOURCE}"
+ rm -rf "${SYSTEM}"
done
done
diff --git a/share/doc/examples/dschinn-backports.cfg b/share/doc/examples/dschinn-backports.cfg
index 1cddcf2..4f72268 100644
--- a/share/doc/examples/dschinn-backports.cfg
+++ b/share/doc/examples/dschinn-backports.cfg
@@ -3,6 +3,11 @@
# example for automated Progress Linux 4+ (dschinn-backports) container creation
# using: sudo container create -s progress-linux
+debconf debconf/priority select critical
+debconf debconf/frontend select Noninteractive
+
+container-tools cnt-debconf/mode select progress-linux
+
#container-tools cnt-debconf/preseed-files string
#container-tools cnt-debconf/include-preseed-files string
@@ -23,21 +28,21 @@ container-tools cnt-debconf/parent-mirror-security string http://security.debian
container-tools cnt-debconf/archive-areas multiselect main, contrib, non-free
container-tools cnt-debconf/parent-archive-areas multiselect main, contrib, non-free
-container-tools cnt-debconf/packages string openssh-server
+container-tools cnt-debconf/packages string knot-resolver openssh-server
container-tools cnt-debconf/root-password string progress
#container-tools cnt-debconf/root-password-crypted string
# Network IP configuration
-container-tools cnt-debconf/network0/bridge string br0
-container-tools cnt-debconf/network0/veth string veth0
-container-tools cnt-debconf/network0/ipv4-method select static
-container-tools cnt-debconf/network0/ipv4-comment string Primary network interfaces
-container-tools cnt-debconf/network0/ipv4-address string 192.168.0.2
-container-tools cnt-debconf/network0/ipv4-gateway string 192.168.0.1
-container-tools cnt-debconf/network0/ipv4-netmask string 255.255.255.0
-#container-tools cnt-debconf/network0/ipv4-post-up string
-#container-tools cnt-debconf/network0/ipv4-post-down string
+container-tools cnt-debconf/network1/bridge string bridge0
+container-tools cnt-debconf/network1/veth string veth0
+container-tools cnt-debconf/network1/ipv4-method select static
+container-tools cnt-debconf/network1/ipv4-comment string Primary network interfaces
+container-tools cnt-debconf/network1/ipv4-address string 192.168.0.2
+container-tools cnt-debconf/network1/ipv4-gateway string 192.168.0.1
+container-tools cnt-debconf/network1/ipv4-netmask string 255.255.255.0
+#container-tools cnt-debconf/network1/ipv4-post-up string
+#container-tools cnt-debconf/network1/ipv4-post-down string
# Network DNS configuration
container-tools cnt-debconf/nameserver/server string 127.0.0.1 8.8.8.8 8.8.4.4
@@ -46,14 +51,14 @@ container-tools cnt-debconf/nameserver/search string example.net
container-tools cnt-debconf/nameserver/options string timeout:1 attempts:1
# Third-Party Repositories
-#container-tools cnt-debconf/archive0/repository string
-#container-tools cnt-debconf/archive0/list string
-#container-tools cnt-debconf/archive0/comment string
-#container-tools cnt-debconf/archive0/source string
-#container-tools cnt-debconf/archive0/key string
-#container-tools cnt-debconf/archive0/preferences-package string
-#container-tools cnt-debconf/archive0/preferences-pin string
-#container-tools cnt-debconf/archive0/preferences-pin-priority
+#container-tools cnt-debconf/archive1/repository string
+#container-tools cnt-debconf/archive1/list string
+#container-tools cnt-debconf/archive1/comment string
+#container-tools cnt-debconf/archive1/source string
+#container-tools cnt-debconf/archive1/key string
+#container-tools cnt-debconf/archive1/preferences-package string
+#container-tools cnt-debconf/archive1/preferences-pin string
+#container-tools cnt-debconf/archive1/preferences-pin-priority
# Internal Options
#container-tools cnt-debconf/apt-recommends string
diff --git a/share/doc/examples/stretch.cfg b/share/doc/examples/stretch.cfg
index 2af4b85..4a137b7 100644
--- a/share/doc/examples/stretch.cfg
+++ b/share/doc/examples/stretch.cfg
@@ -3,6 +3,11 @@
# example for automated Debian 9 (stretch) based container creation
# using: sudo container create -s debian
+debconf debconf/priority select critical
+debconf debconf/frontend select Noninteractive
+
+container-tools cnt-debconf/mode select debian
+
#container-tools cnt-debconf/preseed-files string
#container-tools cnt-debconf/include-preseed-files string
@@ -28,5 +33,5 @@ container-tools cnt-debconf/packages string openssh-server
container-tools cnt-debconf/root-password string debian
#container-tools cnt-debconf/root-password-crypted string
-container-tools cnt-debconf/network0/bridge string br0
+container-tools cnt-debconf/network1/bridge string bridge0
#container-tools cnt-debconf/network-mac string
diff --git a/share/man/container-auto.1 b/share/man/container-auto.1
new file mode 100644
index 0000000..bd0d7ea
--- /dev/null
+++ b/share/man/container-auto.1
@@ -0,0 +1,80 @@
+'\" t
+.\" Title: container-start
+.\" Author: [see the "AUTHORS" section]
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\" Date: 20170701
+.\" Manual: Open Infrastructure
+.\" Source: container-tools
+.\" Language: English
+.\"
+.TH "CONTAINER\-START" "1" "20170701" "container\-tools" "Open Infrastructure"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+container-auto \- Start/stop all container automatically at boot/shutdown
+.SH "SYNOPSIS"
+.sp
+\fBcontainer auto\fR [\fIOPTIONS\fR]
+.SH "DESCRIPTION"
+.sp
+The container auto command starts or stops all container on the host system\&.
+.SH "OPTIONS"
+.sp
+The following container options are available:
+.PP
+\fB\-f, \-\-force\fR
+.RS 4
+Removing stray lock file if existing\&.
+.RE
+.PP
+\fB\-s, \-\-start\fR
+.RS 4
+Start all container on the host system\&.
+.RE
+.PP
+\fB\-t, \-\-stop\fR
+.RS 4
+Stop all container on the host system\&.
+.RE
+.SH "EXAMPLES"
+.PP
+\fBStart all container on the host system:\fR
+.RS 4
+sudo container auto \-\-start
+.RE
+.PP
+\fBStop all container on the host system:\fR
+.RS 4
+sudo container auto \-\-stop
+.RE
+.SH "SEE ALSO"
+.sp
+container\-tools(7), container(1)\&.
+.SH "HOMEPAGE"
+.sp
+More information about container\-tools and the Open Infrastructure project can be found on the homepage at https://open\-infrastructure\&.net\&.
+.SH "CONTACT"
+.sp
+Bug reports, feature requests, help, patches, support and everything else are welcome on the Open Infrastructure Software Mailing List <software@lists\&.open\-infrastructure\&.net>\&.
+.sp
+Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs\&.debian\&.org\&.
+.SH "AUTHORS"
+.sp
+container\-tools was written by Daniel Baumann <daniel\&.baumann@open\-infrastructure\&.net>\&.
diff --git a/share/man/container-console.1 b/share/man/container-console.1
new file mode 100644
index 0000000..ad82fae
--- /dev/null
+++ b/share/man/container-console.1
@@ -0,0 +1,65 @@
+'\" t
+.\" Title: container-console
+.\" Author: [see the "AUTHORS" section]
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\" Date: 20170701
+.\" Manual: Open Infrastructure
+.\" Source: container-tools
+.\" Language: English
+.\"
+.TH "CONTAINER\-CONSOLE" "1" "20170701" "container\-tools" "Open Infrastructure"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+container-console \- Attach a console to a container
+.SH "SYNOPSIS"
+.sp
+\fBcontainer console\fR [\fIOPTIONS\fR]
+.SH "DESCRIPTION"
+.sp
+The container console command attaches a console to a container\&.
+.SH "OPTIONS"
+.sp
+The following container options are available:
+.PP
+\fB\-n, \-\-name=\fR\fB\fINAME\fR\fR
+.RS 4
+Specify container name\&.
+.RE
+.SH "EXAMPLES"
+.PP
+\fBAttach console to example\&.net container:\fR
+.RS 4
+sudo container console \-n example\&.net
+.RE
+.SH "SEE ALSO"
+.sp
+container\-tools(7), container(1)\&.
+.SH "HOMEPAGE"
+.sp
+More information about container\-tools and the Open Infrastructure project can be found on the homepage at https://open\-infrastructure\&.net\&.
+.SH "CONTACT"
+.sp
+Bug reports, feature requests, help, patches, support and everything else are welcome on the Open Infrastructure Software Mailing List <software@lists\&.open\-infrastructure\&.net>\&.
+.sp
+Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs\&.debian\&.org\&.
+.SH "AUTHORS"
+.sp
+container\-tools was written by Daniel Baumann <daniel\&.baumann@open\-infrastructure\&.net>\&.
diff --git a/share/man/container-create-curl.1 b/share/man/container-create-curl.1
new file mode 100644
index 0000000..a69522f
--- /dev/null
+++ b/share/man/container-create-curl.1
@@ -0,0 +1,165 @@
+'\" t
+.\" Title: container-create-curl
+.\" Author: [see the "AUTHORS" section]
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\" Date: 20170701
+.\" Manual: Open Infrastructure
+.\" Source: container-tools
+.\" Language: English
+.\"
+.TH "CONTAINER\-CREATE\-C" "1" "20170701" "container\-tools" "Open Infrastructure"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+container-create-curl \- Create a Debian based container by downloading a tarball over the network
+.SH "SYNOPSIS"
+.sp
+\fBcontainer create \-s curl\fR [\fIOPTIONS\fR]
+.SH "DESCRIPTION"
+.sp
+The curl container creation script uses curl(1) to download a tarball over the network to create a Debian based container\&.
+.sp
+Depending on the tarball this script otherwise creates a pure Debian system with three modificiations:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+hostname is set (container name) in /etc/hostname
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+systemd machine\-id is generated in /etc/machine\-id
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+root password is set (user specified or 16 random characters)
+.RE
+.SH "OPTIONS"
+.sp
+The following script options are available:
+.PP
+\fB\-n, \-\-name=\fR\fB\fINAME\fR\fR
+.RS 4
+Specify container name\&.
+.RE
+.PP
+\fB\-a, \-\-architecture=\fR\fB\fIARCHITECTURE\fR\fR
+.RS 4
+Specify container architecture\&.
+.RE
+.PP
+"\-\-clean*
+.RS 4
+Remove downloaded tarball after successfull container creation\&.
+.RE
+.PP
+\fB\-p, \-\-root\-password=\fR\fB\fIPASSWORD\fR\fR
+.RS 4
+Specify the root password, defaults to a random 16 character password\&.
+.RE
+.PP
+\fB\-\-server=\fR\fB\fISERVER\fR\fR
+.RS 4
+Specify the image server to download from, defaults to
+https://files\&.open\-infrastructure\&.net/system/container/debian\&.
+.RE
+.PP
+\fB\-\-setup=\fR\fB\fISETUP\fR\fR
+.RS 4
+.RE
+.PP
+\fB\-\-system=\fR\fB\fISYSTEM\fR\fR
+.RS 4
+.RE
+.SH "EXAMPLES"
+.PP
+\fBCreate a Debian 9 (stretch) based container with same architecture as the host system:\fR
+.RS 4
+sudo container create \-s curl \-n stretch\&.example\&.net
+.RE
+.PP
+\fBCreate a Debian 9 (stretch) based container with different architecture as the host system:\fR
+.RS 4
+sudo container create \-s curl \-n stretch\-i386\&.example\&.net \(em \-\-system debian\-stretch\-current_i386\&.system\&.tar\&.xz
+.RE
+.SH "FILES"
+.sp
+The following files are used:
+.PP
+\fB/etc/container\-tools/config\fR
+.RS 4
+Container configuration files\&.
+.RE
+.PP
+\fB/usr/share/container\-tools/scripts\fR
+.RS 4
+Container creation scripts\&.
+.RE
+.PP
+\fB/usr/share/doc/container\-tools\fR
+.RS 4
+Container documentation\&.
+.RE
+.PP
+\fB/var/lib/machines\fR
+.RS 4
+Container directory\&.
+.RE
+.PP
+\fB/var/cache/container\-tools\fR
+.RS 4
+Container cache directory\&.
+.RE
+.SH "CONTAINER IMAGES"
+.sp
+container\-tools will download tarballs from a server expecting that the images are tarballs with either gzip, lzip, xz, or no compression\&. See container\-images\&.sh as an example on how to create your own container images\&.
+.SH "SEE ALSO"
+.sp
+container\-tools(7), container(1)\&.
+.SH "HOMEPAGE"
+.sp
+More information about container\-tools and the Open Infrastructure project can be found on the homepage at https://open\-infrastructure\&.net\&.
+.SH "CONTACT"
+.sp
+Bug reports, feature requests, help, patches, support and everything else are welcome on the Open Infrastructure Software Mailing List <software@lists\&.open\-infrastructure\&.net>\&.
+.sp
+Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs\&.debian\&.org\&.
+.SH "AUTHORS"
+.sp
+container\-tools was written by Daniel Baumann <daniel\&.baumann@open\-infrastructure\&.net>\&.
diff --git a/share/man/container-create-curl.1.txt b/share/man/container-create-curl.1.txt
index a1bd487..8e267ce 100644
--- a/share/man/container-create-curl.1.txt
+++ b/share/man/container-create-curl.1.txt
@@ -51,17 +51,23 @@ The following script options are available:
*-n, --name='NAME'*::
Specify container name.
+*-a, --architecture='ARCHITECTURE'*::
+ Specify container architecture.
+
"--clean*::
Remove downloaded tarball after successfull container creation.
-*--image='IMAGE'*::
- Specify the image name to download, defaults to debian-stretch-${ARCHITECTURE}.tar.xz (where ${ARCHITECTURE} is the host systems architecture).
+*-p, --root-password='PASSWORD'*::
+ Specify the root password, defaults to a random 16 character password.
*--server='SERVER'*::
- Specify the image server to download from, defaults to https://files.open-infrastructure.net/images/container-tools/current.
+ Specify the image server to download from, defaults to https://files.open-infrastructure.net/system/container/debian.
-*-p, --root-password='PASSWORD'*::
- Specify the root password, defaults to a random 16 character password.
+*--setup='SETUP'*::
+ Specify the setup image name to download, defaults to the value specified through --system using the setup.tar.${COMPRESSION} suffix.
+
+*--system='SYSTEM'*::
+ Specify the system image name to download, defaults to debian-stretch-current_${ARCHITECTURE}.system.tar.${COMPRESSION} (where ${ARCHITECTURE} is the host systems architecture and ${COMPRESSION} either lz, xz, or gz depending on compressor availability on the host system).
EXAMPLES
@@ -70,7 +76,7 @@ EXAMPLES
sudo container create -s curl -n stretch.example.net
*Create a Debian 9 (stretch) based container with different architecture as the host system:*::
- sudo container create -s curl -n stretch-i386.example.net -- --image debian-stretch-i386.tar.xz
+ sudo container create -s curl -n stretch-i386.example.net -- --system debian-stretch-current_i386.system.tar.xz
FILES
-----
diff --git a/share/man/container-create-debconf.1 b/share/man/container-create-debconf.1
new file mode 100644
index 0000000..27c46c5
--- /dev/null
+++ b/share/man/container-create-debconf.1
@@ -0,0 +1,179 @@
+'\" t
+.\" Title: container-create-debootstrap
+.\" Author: [see the "AUTHORS" section]
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\" Date: 20170701
+.\" Manual: Open Infrastructure
+.\" Source: container-tools
+.\" Language: English
+.\"
+.TH "CONTAINER\-CREATE\-D" "1" "20170701" "container\-tools" "Open Infrastructure"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+container-create-debconf \- Create an advanced Debian based container with debconf
+.SH "SYNOPSIS"
+.sp
+\fBcontainer create \-s debconf\fR [\fIOPTIONS\fR] \fBcontainer create \-s debian\fR [\fIOPTIONS\fR] \fBcontainer create \-s progress\-linux\fR [\fIOPTIONS\fR]
+.SH "DESCRIPTION"
+.sp
+The debconf container creation script uses debconf(1) to automatically create a Debian based container\&.
+.SS "SCOPE"
+.sp
+Note that this container creation script can do a few things more than just automatically debootstrap based on a preseed file\&. It also allows you to set a root password, configure the network, install certain packages and execute hooks\&.
+.sp
+But: this is \fBnot\fR a replacement for a configuration management system (like ansible, puppet, etc\&.)\&. The intenion of this script is to create the initial container to that extend that a configuration managment system can take over\&.
+.sp
+As an analogy, think of debian\-installer: d\-i sets up your system to make it ready to boot and connect to the network\&. Everything after that is out of scope\&. Same goes for this script\&. (FIXME)
+.SS "FUNCTIONS"
+.sp
+This script performs the following configuration on top of a Debian based system:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+network
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+root password
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+apt repositories
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+\&...
+.RE
+.SS "MODES"
+.sp
+This container creation script can be used under two different names: debian and progress\-linux\&.
+.sp
+Alternative, calling it under the debconf name is equal to the debian mode\&.
+.SS "INTERACTIVE/NONINTERACTIVE"
+.sp
+FIXME
+.SS "PRESEEDING"
+.sp
+Hierarchy of Preseed Files
+.sp
+The debconf script can be fully preseeded\&. Such preseed files can include one or more preseed files themselfs (currently, only one layer of includes is supported, no nested or recursive includes)\&.
+.sp
+The general rule of \fIthe later preseed file overwrites the earlier\fR applies\&. The debconf script reads the main preseed file (specified either on command line or by debconf selection/input dialog) after any included preseed files in there\&.
+.sp
+That means that debconf values after the include statement in the main preseed file can overwrite any values specified in the included preseed files\&.
+.SH "OPTIONS"
+.sp
+The following script options are available:
+.PP
+\fB\-n, \-\-name=\fR\fB\fINAME\fR\fR
+.RS 4
+Specify container name\&.
+.RE
+.PP
+\fB\-p, \-\-preseed\-file=\fR\fB\fIFILE\fR\fR
+.RS 4
+Specify the preseed file\&.
+.RE
+.SH "EXAMPLES"
+.PP
+\fBCreate a Debian based container:\fR
+.RS 4
+sudo container create \-s debian \-n stretch\&.example\&.net
+.RE
+.PP
+\fBCreate a Progress Linux container:\fR
+.RS 4
+sudo container create \-s progress\-linux \-n cairon\-backports\&.example\&.net
+.RE
+.SH "FILES"
+.sp
+The following files are used:
+.PP
+\fB/etc/container\-tools/config\fR
+.RS 4
+Container configuration files\&.
+.RE
+.PP
+\fB/usr/share/container\-tools/scripts\fR
+.RS 4
+Container creation scripts\&.
+.RE
+.PP
+\fB/usr/share/doc/container\-tools\fR
+.RS 4
+Container documentation\&.
+.RE
+.PP
+\fB/var/lib/machines\fR
+.RS 4
+Container directory\&.
+.RE
+.PP
+\fB/var/cache/container\-tools\fR
+.RS 4
+Container cache directory\&.
+.RE
+.PP
+\fB/tmp/container\-tools\fR
+.RS 4
+Container temporary directory\&.
+.RE
+.SH "SEE ALSO"
+.sp
+container\-tools(7), container(1)\&.
+.SH "HOMEPAGE"
+.sp
+More information about container\-tools and the Open Infrastructure project can be found on the homepage at https://open\-infrastructure\&.net\&.
+.SH "CONTACT"
+.sp
+Bug reports, feature requests, help, patches, support and everything else are welcome on the Open Infrastructure Software Mailing List <software@lists\&.open\-infrastructure\&.net>\&.
+.sp
+Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs\&.debian\&.org\&.
+.SH "AUTHORS"
+.sp
+container\-tools was written by Daniel Baumann <daniel\&.baumann@open\-infrastructure\&.net>\&.
diff --git a/share/man/container-create-debootstrap.1 b/share/man/container-create-debootstrap.1
new file mode 100644
index 0000000..98f03e3
--- /dev/null
+++ b/share/man/container-create-debootstrap.1
@@ -0,0 +1,126 @@
+'\" t
+.\" Title: container-create-debootstrap
+.\" Author: [see the "AUTHORS" section]
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\" Date: 20170701
+.\" Manual: Open Infrastructure
+.\" Source: container-tools
+.\" Language: English
+.\"
+.TH "CONTAINER\-CREATE\-D" "1" "20170701" "container\-tools" "Open Infrastructure"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+container-create-debootstrap \- Create a basic Debian based container with debootstrap
+.SH "SYNOPSIS"
+.sp
+\fBcontainer create \-s debootstrap\fR [\fIOPTIONS\fR]
+.SH "DESCRIPTION"
+.sp
+The debootstrap container creation script uses debootstrap(8) to create a Debian based container\&.
+.sp
+This script creates a pure Debian system with three modificiations:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+apt cache of packages downloaded during debootstrap is cleaned
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+hostname is set (container name) in /etc/hostname
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+root password is set (user specified or 16 random characters)
+.RE
+.SH "OPTIONS"
+.sp
+The following script options are available:
+.PP
+\fB\-n, \-\-name=\fR\fB\fINAME\fR\fR
+.RS 4
+Specify container name\&.
+.RE
+.PP
+\fB\-a, \-\-architecture=\fR\fB\fIARCHITECTURE\fR\fR
+.RS 4
+Specify the Debian architecture, defaults to the host systems architecture\&.
+.RE
+.PP
+\fB\-d, \-\-distribution=\fR\fB\fIDISTRIBUTION\fR\fR
+.RS 4
+Specify the Debian distribution, defaults to stretch\&.
+.RE
+.PP
+\fB\-m, \-\-mirror=\fR\fB\fIMIRROR\fR\fR
+.RS 4
+Specify the Debian mirror, defaults to
+https://deb\&.debian\&.org/debian\&.
+.RE
+.PP
+\fB\-p, \-\-root\-password=\fR\fB\fIPASSWORD\fR\fR
+.RS 4
+Specify the root password, defaults to a random 16 character password\&.
+.RE
+.SH "EXAMPLES"
+.PP
+\fBCreate a Debian 9 (stretch) based container with same architecture as the host system:\fR
+.RS 4
+sudo container create \-s debootstrap \-n stretch\&.example\&.net
+.RE
+.PP
+\fBCreate a Debian 9 (stretch) based container with different architecture as the host system:\fR
+.RS 4
+sudo container create \-s debootstrap \-n stretch\-i386\&.example\&.net \(em \-a i386
+.RE
+.SH "SEE ALSO"
+.sp
+container\-tools(7), container(1)\&.
+.SH "HOMEPAGE"
+.sp
+More information about container\-tools and the Open Infrastructure project can be found on the homepage at https://open\-infrastructure\&.net\&.
+.SH "CONTACT"
+.sp
+Bug reports, feature requests, help, patches, support and everything else are welcome on the Open Infrastructure Software Mailing List <software@lists\&.open\-infrastructure\&.net>\&.
+.sp
+Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs\&.debian\&.org\&.
+.SH "AUTHORS"
+.sp
+container\-tools was written by Daniel Baumann <daniel\&.baumann@open\-infrastructure\&.net>\&.
diff --git a/share/man/container-create.1 b/share/man/container-create.1
new file mode 100644
index 0000000..dbae72a
--- /dev/null
+++ b/share/man/container-create.1
@@ -0,0 +1,134 @@
+'\" t
+.\" Title: container-create
+.\" Author: [see the "AUTHORS" section]
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\" Date: 20170701
+.\" Manual: Open Infrastructure
+.\" Source: container-tools
+.\" Language: English
+.\"
+.TH "CONTAINER\-CREATE" "1" "20170701" "container\-tools" "Open Infrastructure"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+container-create \- Create a container
+.SH "SYNOPSIS"
+.sp
+\fBcontainer create\fR [\fIOPTIONS\fR]
+.SH "DESCRIPTION"
+.sp
+The container\-create command creates a container based on a script\&.
+.SH "OPTIONS"
+.sp
+The following container\-create options are available:
+.PP
+\fB\-n, \-\-name=\fR\fB\fINAME\fR\fR
+.RS 4
+Specify container name\&.
+.RE
+.PP
+\fB\-c, \-\-capability=\fR\fB\fICAPABILITY\fR\fR
+.RS 4
+Specify capabilities to grant, see capabilities(7)\&.
+.RE
+.PP
+\fB\-d, \-\-drop\-capability=\fR\fB\fIDROP_CAPABILITY\fR\fR
+.RS 4
+Specify capabilities to drop, see capabilities(7)\&.
+.RE
+.PP
+\fB\-s, \-\-script=\fR\fB\fISCRIPT\fR\fR
+.RS 4
+Specify container creation script, defaults to debootstrap\&.
+.RE
+.PP
+\fB\-b, \-\-bind=\fR\fB\fIDIRECTORY:DIRECTORY[:OPTIONS][;DIRECTORY:DIRECTORY[:OPTIONS]]\fR\fR
+.RS 4
+Specify container read\-write bind mounts, see systemd\-nspawn(1) \-\-bind option\&.
+.RE
+.PP
+\fB\-\-bind\-ro=\fR\fB\fIDIRECTORY:DIRECTORY[:OPTIONS][;DIRECTORY:DIRECTORY[:OPTIONS]]\fR\fR
+.RS 4
+Specify container read\-only bind mounts, see systemd\-nspawn(1) \-\-bind\-ro option\&.
+.RE
+.PP
+\fB\-\-cnt\-overlay=\fR\fB\fIDIRECTORY_LOWER:DIRECTORY_UPPER:DIRECTORY_WORK:DIRECTORY_MERGED[;DIRECTORY_UPPER:DIRECTORY_LOWER:DIRECTORY_WORK:DIRECTORY_MERGED]\fR\fR
+.RS 4
+Specify container overlay mounts, see Documentation/filesystems/overlayfs\&.txt\&.
+.RE
+.SH "SCRIPTS"
+.sp
+The following container scripts are available:
+.PP
+\fBcurl\fR
+.RS 4
+Basic script to create Debian based container, see container\-create\-curl(1)\&.
+.RE
+.PP
+\fBdebootstrap\fR
+.RS 4
+Basic script to create Debian based container, see container\-create\-debootstrap(1)\&.
+.RE
+.PP
+\fBdebconf\fR
+.RS 4
+Advanced script to automatically create Debian based container, see container\-create\-debconf(1)\&.
+.RE
+.PP
+\fBdefault\fR
+.RS 4
+Symlink (if existing) to a container script which is used if no script was specified\&. On Debian based system this can be managed through update\-alternatives(1), i\&.e\&.
+\fIsudo update\-alternatives \-\-config container\-tools_script\fR\&.
+.RE
+.SH "EXAMPLES"
+.PP
+\fBCreate example\&.net container using curl script:\fR
+.RS 4
+sudo container create \-n example\&.net \-s curl
+.RE
+.PP
+\fBCreate example\&.net container using debootstrap script:\fR
+.RS 4
+sudo container create \-n example\&.net \-s debootstrap
+.RE
+.PP
+\fBCreate example\&.net container using debconf script:\fR
+.RS 4
+sudo container create \-n example\&.net \-s debconf
+.RE
+.PP
+\fBCreate example\&.net container with the default create script and start it:\fR
+.RS 4
+sudo container create,start \-n example\&.net
+.RE
+.SH "SEE ALSO"
+.sp
+container\-tools(7), container(1)\&.
+.SH "HOMEPAGE"
+.sp
+More information about container\-tools and the Open Infrastructure project can be found on the homepage at https://open\-infrastructure\&.net\&.
+.SH "CONTACT"
+.sp
+Bug reports, feature requests, help, patches, support and everything else are welcome on the Open Infrastructure Software Mailing List <software@lists\&.open\-infrastructure\&.net>\&.
+.sp
+Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs\&.debian\&.org\&.
+.SH "AUTHORS"
+.sp
+container\-tools was written by Daniel Baumann <daniel\&.baumann@open\-infrastructure\&.net>\&.
diff --git a/share/man/container-enter.1 b/share/man/container-enter.1
new file mode 100644
index 0000000..8277363
--- /dev/null
+++ b/share/man/container-enter.1
@@ -0,0 +1,65 @@
+'\" t
+.\" Title: container-console
+.\" Author: [see the "AUTHORS" section]
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\" Date: 20170701
+.\" Manual: Open Infrastructure
+.\" Source: container-tools
+.\" Language: English
+.\"
+.TH "CONTAINER\-CONSOLE" "1" "20170701" "container\-tools" "Open Infrastructure"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+container-enter \- Enter a container namespace
+.SH "SYNOPSIS"
+.sp
+\fBcontainer enter\fR [\fIOPTIONS\fR]
+.SH "DESCRIPTION"
+.sp
+The container enter enters a container namespace\&.
+.SH "OPTIONS"
+.sp
+The following container options are available:
+.PP
+\fB\-n, \-\-name=\fR\fB\fINAME\fR\fR
+.RS 4
+Specify container name\&.
+.RE
+.SH "EXAMPLES"
+.PP
+\fBEnter to example\&.net container namespace:\fR
+.RS 4
+sudo container enter \-n example\&.net
+.RE
+.SH "SEE ALSO"
+.sp
+container\-tools(7), container(1)\&.
+.SH "HOMEPAGE"
+.sp
+More information about container\-tools and the Open Infrastructure project can be found on the homepage at https://open\-infrastructure\&.net\&.
+.SH "CONTACT"
+.sp
+Bug reports, feature requests, help, patches, support and everything else are welcome on the Open Infrastructure Software Mailing List <software@lists\&.open\-infrastructure\&.net>\&.
+.sp
+Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs\&.debian\&.org\&.
+.SH "AUTHORS"
+.sp
+container\-tools was written by Daniel Baumann <daniel\&.baumann@open\-infrastructure\&.net>\&.
diff --git a/share/man/container-key.1 b/share/man/container-key.1
new file mode 100644
index 0000000..eaa6c60
--- /dev/null
+++ b/share/man/container-key.1
@@ -0,0 +1,80 @@
+'\" t
+.\" Title: container-key
+.\" Author: [see the "AUTHORS" section]
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\" Date: 20170701
+.\" Manual: Open Infrastructure
+.\" Source: container-tools
+.\" Language: English
+.\"
+.TH "CONTAINER\-KEY" "1" "20170701" "container\-tools" "Open Infrastructure"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+container-key \- Manage GnuPG keyring for container operations
+.SH "SYNOPSIS"
+.sp
+\fBcontainer key\fR [\fIOPTIONS\fR]
+.SH "DESCRIPTION"
+.sp
+The container key manages the GnuPG keyring for container operations\&.
+.SH "OPTIONS"
+.sp
+The following container options are available:
+.PP
+\fB\-a, \-\-add=\fR\fB\fIKEY\fR\fR
+.RS 4
+Add a key to the keyring\&.
+.RE
+.PP
+\fB\-l, \-\-list\*(Aq\fR
+.RS 4
+List keys in the keyring\&.
+.RE
+.PP
+\fB\-r, \-\-remove=\fR\fB\fIKEY\fR\fR
+.RS 4
+Remove a key from the keyring\&.
+.RE
+.SH "EXAMPLES"
+.PP
+\fBAdd a key to the keyring:\fR
+.RS 4
+gpg \-\-keyserver hkps://hkps\&.pool\&.sks\-keyservers\&.net \-\-recv 0x1E9B3AED2D9FA8F6 gpg \-\-armor \-\-export 0x1E9B3AED2D9FA8F6 | sudo container key \-\-add \-
+.RE
+.PP
+\fBRemove a key from the keyring:\fR
+.RS 4
+sudo container key \-\-remove 0x1E9B3AED2D9FA8F6
+.RE
+.SH "SEE ALSO"
+.sp
+container\-tools(7), container(1)\&.
+.SH "HOMEPAGE"
+.sp
+More information about container\-tools and the Open Infrastructure project can be found on the homepage at https://open\-infrastructure\&.net\&.
+.SH "CONTACT"
+.sp
+Bug reports, feature requests, help, patches, support and everything else are welcome on the Open Infrastructure Software Mailing List <software@lists\&.open\-infrastructure\&.net>\&.
+.sp
+Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs\&.debian\&.org\&.
+.SH "AUTHORS"
+.sp
+container\-tools was written by Daniel Baumann <daniel\&.baumann@open\-infrastructure\&.net>\&.
diff --git a/share/man/container-key.1.txt b/share/man/container-key.1.txt
new file mode 100644
index 0000000..070047b
--- /dev/null
+++ b/share/man/container-key.1.txt
@@ -0,0 +1,85 @@
+// container-tools - Manage systemd-nspawn containers
+// Copyright (C) 2014-2017 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-KEY(1)
+================
+:doctype: manpage
+:man manual: Open Infrastructure
+:man source: container-tools
+:man version: {revnumber}
+
+
+NAME
+----
+container-key - Manage GnuPG keyring for container operations
+
+
+SYNOPSIS
+--------
+*container key* ['OPTIONS']
+
+
+DESCRIPTION
+-----------
+The container key manages the GnuPG keyring for container operations.
+
+
+OPTIONS
+-------
+The following container options are available:
+
+*-a, --add='KEY'*::
+ Add a key to the keyring.
+
+*-l, --list'*::
+ List keys in the keyring.
+
+*-r, --remove='KEY'*::
+ Remove a key from the keyring.
+
+
+EXAMPLES
+--------
+*Add a key to the keyring:*::
+ gpg --keyserver hkps://hkps.pool.sks-keyservers.net --recv 0x1E9B3AED2D9FA8F6
+ gpg --armor --export 0x1E9B3AED2D9FA8F6 | sudo container key --add -
+
+*Remove a key from the keyring:*::
+ sudo container key --remove 0x1E9B3AED2D9FA8F6
+
+
+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-limit.1 b/share/man/container-limit.1
new file mode 100644
index 0000000..762ee1d
--- /dev/null
+++ b/share/man/container-limit.1
@@ -0,0 +1,120 @@
+'\" t
+.\" Title: container-limit
+.\" Author: [see the "AUTHORS" section]
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\" Date: 20170701
+.\" Manual: Open Infrastructure
+.\" Source: container-tools
+.\" Language: English
+.\"
+.TH "CONTAINER\-LIMIT" "1" "20170701" "container\-tools" "Open Infrastructure"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+container-limit \- Limit ressources of a container
+.SH "SYNOPSIS"
+.sp
+\fBcontainer limit\fR [\fIOPTIONS\fR]
+.SH "DESCRIPTION"
+.sp
+The container limit command limits ressources available to a container at runtime\&.
+.SH "OPTIONS"
+.sp
+The following container options are available:
+.PP
+\fB\-n, \-\-name=\fR\fB\fINAME\fR\fR
+.RS 4
+Specify container name\&.
+.RE
+.PP
+\fB\-\-blockio\-device\-weight=\fR\fB\fIDEVICE WEIGHT\fR\fR
+.RS 4
+Specify device specific blockio weight, see systemd\&.resource\-control(5)\&.
+.RE
+.PP
+\fB\-\-blockio\-read\-bandwidth=\fR\fB\fIDEVICE BYTES\fR\fR
+.RS 4
+Specify device specific blockio read bandwidth, see systemd\&.resource\-control(5)\&.
+.RE
+.PP
+\fB\-b, \-\-blockio\-weight=\fR\fB\fIWEIGHT\fR\fR
+.RS 4
+Specify general blockio weight, see systemd\&.resource\-control(5)\&.
+.RE
+.PP
+\fB\-\-blockio\-write\-bandwidth=\fR\fB\fIDEVICE BYTES\fR\fR
+.RS 4
+Specify device specific blockio write bandwidth, see systemd\&.resource\-control(5)\&.
+.RE
+.PP
+\fB\-c, \-\-cpu\-quota=\fR\fB\fIQUOTA\fR\fR
+.RS 4
+Specify CPU quota, see systemd\&.resource\-control(5)\&.
+.RE
+.PP
+\fB\-\-cpu\-shares=\fR\fB\fISHARES\fR\fR
+.RS 4
+Specify CPU shares, see systemd\&.resource\-control(5)\&.
+.RE
+.PP
+\fB\-m, \-\-memory\-limit=\fR\fB\fIBYTES\fR\fR
+.RS 4
+Specify memory limit, see systemd\&.resource\-control(5)\&.
+.RE
+.PP
+\fB\-t, \-\-tasks\-max=\fR\fB\fINUMBER\fR\fR
+.RS 4
+Specify tasks max, see systemd\&.resource\-control(5)\&.
+.RE
+.SH "EXAMPLES"
+.PP
+\fBSet blockio weight for the example\&.net container:\fR
+.RS 4
+sudo container limit \-n example\&.net \-\-blockio\-weight 100
+.RE
+.PP
+\fBSet CPU quota for the example\&.net container:\fR
+.RS 4
+sudo container limit \-n example\&.net \-\-cpu\-quota 10%
+.RE
+.PP
+\fBSet memory limit for the example\&.net container to 1GB:\fR
+.RS 4
+sudo container limit \-n example\&.net \-\-memory\-limit 1G
+.RE
+.PP
+\fBSet tasks max for the example\&.net container to 100:\fR
+.RS 4
+sudo container limit \-n example\&.net \-\-tasks\-max 100
+.RE
+.SH "SEE ALSO"
+.sp
+container\-tools(7), container(1)\&.
+.SH "HOMEPAGE"
+.sp
+More information about container\-tools and the Open Infrastructure project can be found on the homepage at https://open\-infrastructure\&.net\&.
+.SH "CONTACT"
+.sp
+Bug reports, feature requests, help, patches, support and everything else are welcome on the Open Infrastructure Software Mailing List <software@lists\&.open\-infrastructure\&.net>\&.
+.sp
+Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs\&.debian\&.org\&.
+.SH "AUTHORS"
+.sp
+container\-tools was written by Daniel Baumann <daniel\&.baumann@open\-infrastructure\&.net>\&.
diff --git a/share/man/container-limit.1.txt b/share/man/container-limit.1.txt
index f942fba..534bd76 100644
--- a/share/man/container-limit.1.txt
+++ b/share/man/container-limit.1.txt
@@ -47,14 +47,14 @@ The following container options are available:
*--blockio-device-weight='DEVICE WEIGHT'*::
Specify device specific blockio weight, see systemd.resource-control(5).
-*--blockio-read-bandwith='DEVICE BYTES'*::
- Specify device specific blockio read bandwith, see systemd.resource-control(5).
+*--blockio-read-bandwidth='DEVICE BYTES'*::
+ Specify device specific blockio read bandwidth, see systemd.resource-control(5).
*-b, --blockio-weight='WEIGHT'*::
Specify general blockio weight, see systemd.resource-control(5).
-*--blockio-write-bandwith='DEVICE BYTES'*::
- Specify device specific blockio write bandwith, see systemd.resource-control(5).
+*--blockio-write-bandwidth='DEVICE BYTES'*::
+ Specify device specific blockio write bandwidth, see systemd.resource-control(5).
*-c, --cpu-quota='QUOTA'*::
Specify CPU quota, see systemd.resource-control(5).
diff --git a/share/man/container-list.1 b/share/man/container-list.1
new file mode 100644
index 0000000..bab849a
--- /dev/null
+++ b/share/man/container-list.1
@@ -0,0 +1,159 @@
+'\" t
+.\" Title: container-list
+.\" Author: [see the "AUTHORS" section]
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\" Date: 20170701
+.\" Manual: Open Infrastructure
+.\" Source: container-tools
+.\" Language: English
+.\"
+.TH "CONTAINER\-LIST" "1" "20170701" "container\-tools" "Open Infrastructure"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+container-list \- List container on the system
+.SH "SYNOPSIS"
+.sp
+\fBcontainer list\fR [\fIOPTIONS\fR]
+.sp
+\fBcontainer ls\fR [\fIOPTIONS\fR]
+.SH "DESCRIPTION"
+.sp
+The container list command lists container on the system\&.
+.SH "OPTIONS"
+.sp
+The following container options are available, defaults to \fB\-\-started \-\-stopped\fR:
+.PP
+\fB\-a, \-\-all\fR
+.RS 4
+List all available container (started, stopped, and other)\&.
+.RE
+.PP
+\fB\-\-csv\-separator=\fR\fB\fISEPARATOR\fR\fR
+.RS 4
+Specify custom CSV separator, defaults to
+\fI,\fR\&.
+.RE
+.PP
+\fB\-f, \-\-format=\fR\fB\fIFORMAT\fR\fR
+.RS 4
+Use format to list container\&. Currently available formats are
+\fIcli\fR
+(default),
+\fIcsv\fR,
+\fIjson\fR,
+\fInwdiag\fR,
+\fIshell\fR,
+\fIyaml\fR, or
+\fIxml\fR\&.
+.RE
+.PP
+\fB\-h, \-\-host=\fR\fB\fIHOSTNAME\fR\fR
+.RS 4
+List only container that are enabled for automatic start on the specified hostname\&. Defaults to list containers of the local system only\&. Using
+\fIall\fR
+shows all container regardless of any automatic start configuration\&.
+.RE
+.PP
+\fB\-\-nwdiag\-color=\fR\fB\fICOLOR\fR\fR
+.RS 4
+Specify custom nwdiag color for the host box, defaults to
+\fI#3465a4\fR\&.
+.RE
+.PP
+\fB\-\-nwdiag\-label=\fR\fB\fILABEL\fR\fR
+.RS 4
+Specify custom nwdiag label for the diagram, defaults to empty\&.
+.RE
+.PP
+\fB\-o, \-\-other\fR
+.RS 4
+List only container that are not enable for automatic start on the current system\&.
+.RE
+.PP
+\fB\-s, \-\-started\fR
+.RS 4
+List only started container\&.
+.RE
+.PP
+\fB\-t, \-\-stopped\fR
+.RS 4
+List only stopped container\&.
+.RE
+.SH "EXAMPLES"
+.PP
+\fBList all started and stopped containers of the local system:\fR
+.RS 4
+sudo container list
+.RE
+.PP
+\fBList all started and other containers:\fR
+.RS 4
+sudo container list \-s \-o
+.RE
+.PP
+\fBCreate a CSV export of all started and stopped containers:\fR
+.RS 4
+sudo container list \-f csv
+.RE
+.PP
+\fBCreate a JSON export of all started and stopped containers:\fR
+.RS 4
+sudo container list \-f json
+.RE
+.PP
+\fBCreate a nwdiag export of all started and stopped containers:\fR
+.RS 4
+sudo container list \-f nwdiag
+.RE
+.PP
+\fBCreate a SVG image via nwdiag of all started and stopped containers:\fR
+.RS 4
+sudo container list \-f nwdiag | nwdiag \-T svg \-o cnt\-list\&.svg \-
+.RE
+.PP
+\fBCreate a shell export of all started and stopped containers:\fR
+.RS 4
+sudo container list \-f shell
+.RE
+.PP
+\fBCreate a YAML export of all started and stopped containers:\fR
+.RS 4
+sudo container list \-f yaml
+.RE
+.PP
+\fBCreate a XML export of all started and stopped containers:\fR
+.RS 4
+sudo container list \-f xml
+.RE
+.SH "SEE ALSO"
+.sp
+container\-tools(7), container(1)\&.
+.SH "HOMEPAGE"
+.sp
+More information about container\-tools and the Open Infrastructure project can be found on the homepage at https://open\-infrastructure\&.net\&.
+.SH "CONTACT"
+.sp
+Bug reports, feature requests, help, patches, support and everything else are welcome on the Open Infrastructure Software Mailing List <software@lists\&.open\-infrastructure\&.net>\&.
+.sp
+Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs\&.debian\&.org\&.
+.SH "AUTHORS"
+.sp
+container\-tools was written by Daniel Baumann <daniel\&.baumann@open\-infrastructure\&.net>\&.
diff --git a/share/man/container-move.1 b/share/man/container-move.1
new file mode 100644
index 0000000..9f8be70
--- /dev/null
+++ b/share/man/container-move.1
@@ -0,0 +1,82 @@
+'\" t
+.\" Title: container-remove
+.\" Author: [see the "AUTHORS" section]
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\" Date: 20170701
+.\" Manual: Open Infrastructure
+.\" Source: container-tools
+.\" Language: English
+.\"
+.TH "CONTAINER\-REMOVE" "1" "20170701" "container\-tools" "Open Infrastructure"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+container-move \- Rename a container
+.SH "SYNOPSIS"
+.sp
+\fBcontainer move\fR [\fIOPTIONS\fR]
+.sp
+\fBcontainer mv\fR [\fIOPTIONS\fR]
+.SH "DESCRIPTION"
+.sp
+The container move commands renames a container\&.
+.SH "OPTIONS"
+.sp
+The following container options are available:
+.PP
+\fB\-n, \-\-new=\fR\fB\fINAME\fR\fR
+.RS 4
+Specify new container name\&.
+.RE
+.PP
+\fB\-f, \-\-force\fR
+.RS 4
+Do not prompt before moving\&.
+.RE
+.PP
+\fB\-o, \-\-old\fR
+.RS 4
+Specify old container name\&.
+.RE
+.SH "EXAMPLES"
+.PP
+\fBRename example\&.net container to example\&.org:\fR
+.RS 4
+sudo container move \-n example\&.org \-o example\&.net
+.RE
+.PP
+\fBRename example\&.net container to example\&.org without prompt:\fR
+.RS 4
+sudo container move \-n example\&.org \-o example\&.net \-f
+.RE
+.SH "SEE ALSO"
+.sp
+container\-tools(7), container(1)\&.
+.SH "HOMEPAGE"
+.sp
+More information about container\-tools and the Open Infrastructure project can be found on the homepage at https://open\-infrastructure\&.net\&.
+.SH "CONTACT"
+.sp
+Bug reports, feature requests, help, patches, support and everything else are welcome on the Open Infrastructure Software Mailing List <software@lists\&.open\-infrastructure\&.net>\&.
+.sp
+Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs\&.debian\&.org\&.
+.SH "AUTHORS"
+.sp
+container\-tools was written by Daniel Baumann <daniel\&.baumann@open\-infrastructure\&.net>\&.
diff --git a/share/man/container-remove.1 b/share/man/container-remove.1
new file mode 100644
index 0000000..ef7edd9
--- /dev/null
+++ b/share/man/container-remove.1
@@ -0,0 +1,82 @@
+'\" t
+.\" Title: container-remove
+.\" Author: [see the "AUTHORS" section]
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\" Date: 20170701
+.\" Manual: Open Infrastructure
+.\" Source: container-tools
+.\" Language: English
+.\"
+.TH "CONTAINER\-REMOVE" "1" "20170701" "container\-tools" "Open Infrastructure"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+container-remove \- Remove a container
+.SH "SYNOPSIS"
+.sp
+\fBcontainer remove\fR [\fIOPTIONS\fR]
+.sp
+\fBcontainer rm\fR [\fIOPTIONS\fR]
+.SH "DESCRIPTION"
+.sp
+The container remove command removes a container\&.
+.SH "OPTIONS"
+.sp
+The following container options are available:
+.PP
+\fB\-n, \-\-name=\fR\fB\fINAME\fR\fR
+.RS 4
+Specify container name\&.
+.RE
+.PP
+\fB\-f, \-\-force\fR
+.RS 4
+Do not prompt before removal\&.
+.RE
+.PP
+\fB\-v, \-\-verbose\fR
+.RS 4
+Explain what is being done\&.
+.RE
+.SH "EXAMPLES"
+.PP
+\fBRemove example\&.net container from the system:\fR
+.RS 4
+sudo container remove \-n example\&.net
+.RE
+.PP
+\fBRemove example\&.net container from the system without prompt:\fR
+.RS 4
+sudo container remove \-n example\&.net \-f
+.RE
+.SH "SEE ALSO"
+.sp
+container\-tools(7), container(1)\&.
+.SH "HOMEPAGE"
+.sp
+More information about container\-tools and the Open Infrastructure project can be found on the homepage at https://open\-infrastructure\&.net\&.
+.SH "CONTACT"
+.sp
+Bug reports, feature requests, help, patches, support and everything else are welcome on the Open Infrastructure Software Mailing List <software@lists\&.open\-infrastructure\&.net>\&.
+.sp
+Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs\&.debian\&.org\&.
+.SH "AUTHORS"
+.sp
+container\-tools was written by Daniel Baumann <daniel\&.baumann@open\-infrastructure\&.net>\&.
diff --git a/share/man/container-restart.1 b/share/man/container-restart.1
new file mode 100644
index 0000000..6867e5a
--- /dev/null
+++ b/share/man/container-restart.1
@@ -0,0 +1,65 @@
+'\" t
+.\" Title: container-restart
+.\" Author: [see the "AUTHORS" section]
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\" Date: 20170701
+.\" Manual: Open Infrastructure
+.\" Source: container-tools
+.\" Language: English
+.\"
+.TH "CONTAINER\-RESTART" "1" "20170701" "container\-tools" "Open Infrastructure"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+container-restart \- Restart a container
+.SH "SYNOPSIS"
+.sp
+\fBcontainer restart\fR [\fIOPTIONS\fR]
+.SH "DESCRIPTION"
+.sp
+The container restart command restarts a container\&.
+.SH "OPTIONS"
+.sp
+The following container options are available:
+.PP
+\fB\-n, \-\-name=\fR\fB\fINAME\fR\fR
+.RS 4
+Specify container name\&.
+.RE
+.SH "EXAMPLES"
+.PP
+\fBRestart example\&.net container:\fR
+.RS 4
+sudo container restart \-n example\&.net
+.RE
+.SH "SEE ALSO"
+.sp
+container\-tools(7), container(1)\&.
+.SH "HOMEPAGE"
+.sp
+More information about container\-tools and the Open Infrastructure project can be found on the homepage at https://open\-infrastructure\&.net\&.
+.SH "CONTACT"
+.sp
+Bug reports, feature requests, help, patches, support and everything else are welcome on the Open Infrastructure Software Mailing List <software@lists\&.open\-infrastructure\&.net>
+.sp
+Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs\&.debian\&.org\&.
+.SH "AUTHORS"
+.sp
+container\-tools was written by Daniel Baumann <daniel\&.baumann@open\-infrastructure\&.net>\&.
diff --git a/share/man/container-shell.1 b/share/man/container-shell.1
new file mode 100644
index 0000000..278ea0b
--- /dev/null
+++ b/share/man/container-shell.1
@@ -0,0 +1,132 @@
+'\" t
+.\" Title: container
+.\" Author: [see the "AUTHORS" section]
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\" Date: 20170701
+.\" Manual: Open Infrastructure
+.\" Source: container-tools
+.\" Language: English
+.\"
+.TH "CONTAINER" "1" "20170701" "container\-tools" "Open Infrastructure"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+container-shell \- Manage systemd\-nspawn containers (shell)
+.SH "SYNOPSIS"
+.sp
+\fBcontainer\-shell\fR
+.SH "DESCRIPTION"
+.sp
+container\-tools provides the system integration for managing containers using systemd\-nspawn\&.
+.SH "COMMANDS"
+.sp
+All container commands are available, see container(1)\&. Additionally, the following commands are specific to container\-shell:
+.PP
+\fBabout:\fR
+.RS 4
+shows introduction (manpage)\&.
+.RE
+.PP
+\fBhelp:\fR
+.RS 4
+shows available commands within the container\-shell\&.
+.RE
+.PP
+\fBhelp COMMAND:\fR
+.RS 4
+shows help (manpage) for a specific container command\&.
+.RE
+.PP
+\fBlogout\fR, \fBexit:\fR
+.RS 4
+exits container\-shell\&.
+.RE
+.SH "USAGE"
+.sp
+Although the container\-shell can be started from a running system like any other program, the main intend is to use the container\-shell via SSH\&. That way otherwise unprivileged users have possibility to manage containers without needing a regular shell login on the container server\&.
+.sp
+For usage over SSH a unprivileged user should be created:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+sudo adduser \-\-gecos "container\-tools,,," \e
+ \-\-home /var/lib/container\-tools/container\-shell \e
+ \-\-shell /usr/bin/container\-shell
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+The container\-shell can then be allowed for specific SSH keys via /var/ib/container\-tools/container\-shell/\&.ssh/authorized_keys like so:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+command="/usr/bin/container\-shell",no\-port\-forwarding,no\-X11\-forwarding,no\-agent\-forwarding,no\-pty ssh\-rsa [\&.\&.\&.]
+.fi
+.if n \{\
+.RE
+.\}
+.SH "RESTRICTED SHELL"
+.sp
+The container\-shell by default grants any user that has access to it to use all available container commands\&.
+.sp
+Through two corresponding environment variables users can be allowed or disallowed to use specific container commands\&. In connection with SSH this makes it possible to grant certain SSH keys (and by that, users) privileges to operate container servers without having to give them root access, a login shell at all and prevents them from doing things they are not trusted to do\&.
+.sp
+Example (blacklisting): In order to allow all commands except for removing and stopping containers, the following variable can be used:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+command="CONTAINER_COMMANDS_DISABLE=\*(Aqremove stop\*(Aq /usr/bin/container\-shell",no\-port\-forwarding,no\-X11\-forwarding,no\-agent\-forwarding,no\-pty ssh\-rsa [\&.\&.\&.]
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+Example (whitelisting): The other way around works too\&. To disallow all commands except for listing containers and showing the container\-tools version, the following variable can be used:
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
+command="CONTAINER_COMMANDS_ENABLE=\*(Aqlist version\*(Aq /usr/bin/container\-shell",no\-port\-forwarding,no\-X11\-forwarding,no\-agent\-forwarding,no\-pty ssh\-rsa [\&.\&.\&.]
+.fi
+.if n \{\
+.RE
+.\}
+.SH "SEE ALSO"
+.sp
+machinectl(1), systemd\-nspawn(1)\&.
+.SH "HOMEPAGE"
+.sp
+More information about container\-tools and the Open Infrastructure project can be found on the homepage at https://open\-infrastructure\&.net\&.
+.SH "CONTACT"
+.sp
+Bug reports, feature requests, help, patches, support and everything else are welcome on the Open Infrastructure Software Mailing List <software@lists\&.open\-infrastructure\&.net>\&.
+.sp
+Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs\&.debian\&.org\&.
+.SH "AUTHORS"
+.sp
+container\-tools was written by Daniel Baumann <daniel\&.baumann@open\-infrastructure\&.net>\&.
diff --git a/share/man/container-start.1 b/share/man/container-start.1
new file mode 100644
index 0000000..c8b455d
--- /dev/null
+++ b/share/man/container-start.1
@@ -0,0 +1,70 @@
+'\" t
+.\" Title: container-start
+.\" Author: [see the "AUTHORS" section]
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\" Date: 20170701
+.\" Manual: Open Infrastructure
+.\" Source: container-tools
+.\" Language: English
+.\"
+.TH "CONTAINER\-START" "1" "20170701" "container\-tools" "Open Infrastructure"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+container-start \- Start a container
+.SH "SYNOPSIS"
+.sp
+\fBcontainer start\fR [\fIOPTIONS\fR]
+.SH "DESCRIPTION"
+.sp
+The container start command starts a container\&.
+.SH "OPTIONS"
+.sp
+The following container options are available:
+.PP
+\fB\-n, \-\-name=\fR\fB\fINAME\fR\fR
+.RS 4
+Specify container name\&.
+.RE
+.PP
+\fB\-f, \-\-force\*(Aq\fR
+.RS 4
+Removing stray lock file if existing\&.
+.RE
+.SH "EXAMPLES"
+.PP
+\fBStart example\&.net container:\fR
+.RS 4
+sudo container start \-n example\&.net
+.RE
+.SH "SEE ALSO"
+.sp
+container\-tools(7), container(1)\&.
+.SH "HOMEPAGE"
+.sp
+More information about container\-tools and the Open Infrastructure project can be found on the homepage at https://open\-infrastructure\&.net\&.
+.SH "CONTACT"
+.sp
+Bug reports, feature requests, help, patches, support and everything else are welcome on the Open Infrastructure Software Mailing List <software@lists\&.open\-infrastructure\&.net>\&.
+.sp
+Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs\&.debian\&.org\&.
+.SH "AUTHORS"
+.sp
+container\-tools was written by Daniel Baumann <daniel\&.baumann@open\-infrastructure\&.net>\&.
diff --git a/share/man/container-status.1 b/share/man/container-status.1
new file mode 100644
index 0000000..04a5352
--- /dev/null
+++ b/share/man/container-status.1
@@ -0,0 +1,65 @@
+'\" t
+.\" Title: container-status
+.\" Author: [see the "AUTHORS" section]
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\" Date: 20170701
+.\" Manual: Open Infrastructure
+.\" Source: container-tools
+.\" Language: English
+.\"
+.TH "CONTAINER\-STATUS" "1" "20170701" "container\-tools" "Open Infrastructure"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+container-status \- Show container status
+.SH "SYNOPSIS"
+.sp
+\fBcontainer status\fR [\fIOPTIONS\fR]
+.SH "DESCRIPTION"
+.sp
+The container\-status command displays the status of a container\&.
+.SH "OPTIONS"
+.sp
+The following container\-status options are available:
+.PP
+\fB\-n, \-\-name=\fR\fB\fINAME\fR\fR
+.RS 4
+Specify container name\&.
+.RE
+.SH "EXAMPLES"
+.PP
+\fBshow status of example\&.net container:\fR
+.RS 4
+sudo container status \-n example\&.net
+.RE
+.SH "SEE ALSO"
+.sp
+container\-tools(7), container(1)\&.
+.SH "HOMEPAGE"
+.sp
+More information about container\-tools and the Open Infrastructure project can be found on the homepage at https://open\-infrastructure\&.net\&.
+.SH "CONTACT"
+.sp
+Bug reports, feature requests, help, patches, support and everything else are welcome on the Open Infrastructure Software Mailing List <software@lists\&.open\-infrastructure\&.net>\&.
+.sp
+Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs\&.debian\&.org\&.
+.SH "AUTHORS"
+.sp
+container\-tools was written by Daniel Baumann <daniel\&.baumann@open\-infrastructure\&.net>\&.
diff --git a/share/man/container-stop.1 b/share/man/container-stop.1
new file mode 100644
index 0000000..b653698
--- /dev/null
+++ b/share/man/container-stop.1
@@ -0,0 +1,75 @@
+'\" t
+.\" Title: container-stop
+.\" Author: [see the "AUTHORS" section]
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\" Date: 20170701
+.\" Manual: Open Infrastructure
+.\" Source: container-tools
+.\" Language: English
+.\"
+.TH "CONTAINER\-STOP" "1" "20170701" "container\-tools" "Open Infrastructure"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+container-stop \- Stop a container
+.SH "SYNOPSIS"
+.sp
+\fBcontainer stop\fR [\fIOPTIONS\fR]
+.SH "DESCRIPTION"
+.sp
+The container stop command stops a container by running the proper shutdown sequence\&.
+.SH "OPTIONS"
+.sp
+The following container options are available:
+.PP
+\fB\-n, \-\-name=\fR\fB\fINAME\fR\fR
+.RS 4
+Specify container name\&.
+.RE
+.PP
+\fB\-f, \-\-force\fR
+.RS 4
+Instead of running the proper shutdown sequence, terminate all processes of the container imediatly\&.
+.RE
+.SH "EXAMPLES"
+.PP
+\fBShutdown example\&.net container:\fR
+.RS 4
+sudo container stop \-n example\&.net
+.RE
+.PP
+\fBImmediately stop example\&.net container:\fR
+.RS 4
+sudo container stop \-n example\&.net \-f
+.RE
+.SH "SEE ALSO"
+.sp
+container\-tools(7), container(1)\&.
+.SH "HOMEPAGE"
+.sp
+More information about container\-tools and the Open Infrastructure project can be found on the homepage at https://open\-infrastructure\&.net\&.
+.SH "CONTACT"
+.sp
+Bug reports, feature requests, help, patches, support and everything else are welcome on the Open Infrastructure Software Mailing List <software@lists\&.open\-infrastructure\&.net>\&.
+.sp
+Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs\&.debian\&.org\&.
+.SH "AUTHORS"
+.sp
+container\-tools was written by Daniel Baumann <daniel\&.baumann@open\-infrastructure\&.net>\&.
diff --git a/share/man/container-tools.7 b/share/man/container-tools.7
new file mode 100644
index 0000000..adf3c65
--- /dev/null
+++ b/share/man/container-tools.7
@@ -0,0 +1,281 @@
+'\" t
+.\" Title: container-tools
+.\" Author: [see the "AUTHORS" section]
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\" Date: 20170701
+.\" Manual: Open Infrastructure
+.\" Source: container-tools
+.\" Language: English
+.\"
+.TH "CONTAINER\-TOOLS" "7" "20170701" "container\-tools" "Open Infrastructure"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+container-tools \- Manage systemd\-nspawn containers
+.SH "DESCRIPTION"
+.PP
+"[A Linux container] is an operating\-system\-level virtualization environment for running multiple isolated Linux systems (containers) on a single Linux control host\&."
+.RS 4
+ \(em Wikipedia (https://en\&.wikipedia\&.org/wiki/LXC)
+.RE
+.sp
+container\-tools provides the system integration for managing containers using systemd\-nspawn\&.
+.SH "DOWNLOAD"
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Upstream Releases:
+https://files\&.open\-infrastructure\&.net/software/container\-tools/upstream
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Upstream Sources:
+https://sources\&.open\-infrastructure\&.net/software/container\-tools
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Debian Releases:
+https://files\&.open\-infrastructure\&.net/software/container\-tools/debian
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Debian Sources:
+https://sources\&.progress\-linux\&.org/users/daniel/debian/packages/open\-infrastructure\-container\-tools
+.RE
+.SH "INSTALLATION"
+.SS "SOURCE"
+.sp
+.RS 4
+.ie n \{\
+\h'-04' 1.\h'+01'\c
+.\}
+.el \{\
+.sp -1
+.IP " 1." 4.2
+.\}
+sudo apt install asciidoc git docbook\-xml docbook\-xsl libxml2\-utils make xsltproc dbus systemd\-container net\-tools
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04' 2.\h'+01'\c
+.\}
+.el \{\
+.sp -1
+.IP " 2." 4.2
+.\}
+git clone
+https://sources\&.open\-infrastructure\&.net/software/container\-tools
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04' 3.\h'+01'\c
+.\}
+.el \{\
+.sp -1
+.IP " 3." 4.2
+.\}
+cd container\-tools && sudo make install
+.RE
+.SS "DEBIAN 9 (STRETCH) AND NEWER"
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+sudo apt install container\-tools
+.RE
+.SH "DEVELOPMENT"
+.sp
+Bug reports, feature requests, help, patches, support and everything else are welcome on the Open Infrastructure Software Mailing List:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+https://lists\&.open\-infrastructure\&.net/listinfo/software
+.RE
+.sp
+Please base patches against the \fInext\fR Git branch using common sense:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+https://www\&.kernel\&.org/doc/Documentation/SubmittingPatches
+.RE
+.sp
+Debian specific bugs can also be reported in the Debian Bug Tracking System:
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+https://bugs\&.debian\&.org
+.RE
+.SH "KNOWN LIMITATIONS"
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+This version of container\-tools currently do not work with systemd\-networkd and depend on ifupdown\&.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Using overlay, the upper directory can not be an NFS mount due to limitations in Linux\*(Aq overlay filesystem, see
+https://git\&.kernel\&.org/cgit/linux/kernel/git/torvalds/linux\&.git/tree/Documentation/filesystems/overlayfs\&.txt
+.RE
+.SH "USAGE"
+.PP
+\fBCreate a new container:\fR
+.RS 4
+sudo container create \-n NAME
+.RE
+.PP
+\fBStart a container:\fR
+.RS 4
+sudo container start \-n NAME
+.RE
+.PP
+\fBStop a container:\fR
+.RS 4
+sudo container stop \-n NAME
+.RE
+.PP
+\fBRemove a container:\fR
+.RS 4
+sudo container remove \-n NAME
+.RE
+.PP
+\fBList container on the system:\fR
+.RS 4
+sudo container list
+.RE
+.PP
+\fBShow container\-tools version:\fR
+.RS 4
+container version
+.RE
+.sp
+See container(1) for a list of all container commands\&.
+.SH "LINKS"
+.PP
+\fB2016\-02\-24: Systemd vs\&. Docker\fR
+.RS 4
+https://lwn\&.net/Articles/676831/
+.RE
+.PP
+\fB2015\-06\-10: Systemd and containers\fR
+.RS 4
+https://lwn\&.net/Articles/647634/
+.RE
+.PP
+\fB2014\-07\-07: Control groups\fR
+.RS 4
+https://lwn\&.net/Articles/604609/
+.RE
+.PP
+\fB2013\-11\-13: Systemd\-Nspawn is Chroot on Steroids [LinuxCon Europe]\fR
+.RS 4
+https://www\&.youtube\&.com/watch?v=s7LlUs5D9p4
+.RE
+.PP
+\fB2013\-11\-03: Creating containers with systemd\-nspawn\fR
+.RS 4
+https://lwn\&.net/Articles/572957/
+.RE
+.PP
+\fB2013\-02\-06: Systemd lightweight containers\fR
+.RS 4
+https://lwn\&.net/Articles/536033/
+.RE
+.PP
+\fB2013\-01\-04: Namespaces in operation\fR
+.RS 4
+https://lwn\&.net/Articles/531114/
+.RE
+.SH "AUTHORS"
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.sp -1
+.IP \(bu 2.3
+.\}
+Daniel Baumann <daniel\&.baumann@open\-infrastructure\&.net>
+.RE
diff --git a/share/man/container-top.1 b/share/man/container-top.1
new file mode 100644
index 0000000..f238602
--- /dev/null
+++ b/share/man/container-top.1
@@ -0,0 +1,65 @@
+'\" t
+.\" Title: container-top
+.\" Author: [see the "AUTHORS" section]
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\" Date: 20170701
+.\" Manual: Open Infrastructure
+.\" Source: container-tools
+.\" Language: English
+.\"
+.TH "CONTAINER\-TOP" "1" "20170701" "container\-tools" "Open Infrastructure"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+container-top \- Dynamic list container on the system
+.SH "SYNOPSIS"
+.sp
+\fBcontainer top\fR [\fIOPTIONS\fR]
+.SH "DESCRIPTION"
+.sp
+The container top command dynamically lists container on the system\&.
+.SH "OPTIONS"
+.sp
+The following container options are available, defaults to \fB\-\-delay 1\fR:
+.PP
+\fB\-d, \-\-delay=\fR\fB\fISECONDS[\&.TENTHS]\fR\fR
+.RS 4
+Specifies the delay between screen updates, defaults to 1\&.
+.RE
+.SH "EXAMPLES"
+.PP
+\fBDynamically list containers of the local system:\fR
+.RS 4
+sudo container top
+.RE
+.SH "SEE ALSO"
+.sp
+container\-tools(7), container(1)\&.
+.SH "HOMEPAGE"
+.sp
+More information about container\-tools and the Open Infrastructure project can be found on the homepage at https://open\-infrastructure\&.net\&.
+.SH "CONTACT"
+.sp
+Bug reports, feature requests, help, patches, support and everything else are welcome on the Open Infrastructure Software Mailing List <software@lists\&.open\-infrastructure\&.net>\&.
+.sp
+Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs\&.debian\&.org\&.
+.SH "AUTHORS"
+.sp
+container\-tools was written by Daniel Baumann <daniel\&.baumann@open\-infrastructure\&.net>\&.
diff --git a/share/man/container-version.1 b/share/man/container-version.1
new file mode 100644
index 0000000..a7aef05
--- /dev/null
+++ b/share/man/container-version.1
@@ -0,0 +1,62 @@
+'\" t
+.\" Title: container-version
+.\" Author: [see the "AUTHORS" section]
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\" Date: 20170701
+.\" Manual: Open Infrastructure
+.\" Source: container-tools
+.\" Language: English
+.\"
+.TH "CONTAINER\-VERSION" "1" "20170701" "container\-tools" "Open Infrastructure"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+container-version \- Show container\-tools version
+.SH "SYNOPSIS"
+.sp
+\fBcontainer version\fR [\fIOPTIONS\fR]
+.sp
+\fBcontainer ver\fR [\fIOPTIONS\fR]
+.SH "DESCRIPTION"
+.sp
+The container version command shows the container\-tools version number\&.
+.SH "OPTIONS"
+.sp
+This command has no options\&.
+.SH "EXAMPLES"
+.PP
+\fBShow container\-tools version:\fR
+.RS 4
+container version
+.RE
+.SH "SEE ALSO"
+.sp
+container\-tools(7), container(1)\&.
+.SH "HOMEPAGE"
+.sp
+More information about container\-tools and the Open Infrastructure project can be found on the homepage at https://open\-infrastructure\&.net\&.
+.SH "CONTACT"
+.sp
+Bug reports, feature requests, help, patches, support and everything else are welcome on the Open Infrastructure Software Mailing List <software@lists\&.open\-infrastructure\&.net>\&.
+.sp
+Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs\&.debian\&.org\&.
+.SH "AUTHORS"
+.sp
+container\-tools was written by Daniel Baumann <daniel\&.baumann@open\-infrastructure\&.net>\&.
diff --git a/share/man/container.1 b/share/man/container.1
new file mode 100644
index 0000000..dc68a0a
--- /dev/null
+++ b/share/man/container.1
@@ -0,0 +1,175 @@
+'\" t
+.\" Title: container
+.\" Author: [see the "AUTHORS" section]
+.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
+.\" Date: 20170701
+.\" Manual: Open Infrastructure
+.\" Source: container-tools
+.\" Language: English
+.\"
+.TH "CONTAINER" "1" "20170701" "container\-tools" "Open Infrastructure"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+container \- Manage systemd\-nspawn containers
+.SH "SYNOPSIS"
+.sp
+\fBcontainer\fR \fICOMMAND\fR [\fIOPTIONS\fR] \fBcontainer\fR \fICOMMAND1\fR,\fICOMMAND2\fR,\&... \fICOMMANDn\fR
+.SH "DESCRIPTION"
+.sp
+container\-tools provides the system integration for managing containers using systemd\-nspawn\&.
+.SH "OPTIONS"
+.sp
+The following container common options are available:
+.PP
+\fB\-n, \-\-name=\fR\fB\fINAME\fR\fR
+.RS 4
+Specify container name\&.
+.RE
+.SH "COMMANDS"
+.sp
+The following container commands are available:
+.PP
+\fBcreate\fR
+.RS 4
+Create a new container, see container\-create(1)\&.
+.RE
+.PP
+\fBstart\fR
+.RS 4
+Start a container, see container\-start(1)\&.
+.RE
+.PP
+\fBrestart\fR
+.RS 4
+Restart a container, see container\-restart(1)\&.
+.RE
+.PP
+\fBstop\fR
+.RS 4
+Stop a container, see container\-stop(1)\&.
+.RE
+.PP
+\fBremove\fR
+.RS 4
+Remove a container, see container\-remove(1)\&.
+.RE
+.PP
+\fBmove\fR
+.RS 4
+Rename a container, see container\-move(1)\&.
+.RE
+.PP
+\fBconsole\fR
+.RS 4
+Attach console to a container, see container\-console(1)\&.
+.RE
+.PP
+\fBenter\fR
+.RS 4
+Enter a container namespace, see container\-enter(1)\&.
+.RE
+.PP
+\fBkey\fR
+.RS 4
+Manage GnuPG keyring for container operations, see container\-key(1)\&.
+.RE
+.PP
+\fBlimit\fR
+.RS 4
+Limit ressources of a container, see container\-limit(1)\&.
+.RE
+.PP
+\fBlist\fR
+.RS 4
+List container on the system, see container\-list(1)\&.
+.RE
+.PP
+\fBstatus\fR
+.RS 4
+Show container status, see container\-status(1)\&.
+.RE
+.PP
+\fBtop\fR
+.RS 4
+Dynamic list of container on the system, see container\-top(1)\&.
+.RE
+.PP
+\fBversion\fR
+.RS 4
+Show container\-tools version, see container\-version(1)\&.
+.RE
+.SH "FILES"
+.sp
+The following files are used:
+.PP
+\fB/etc/container\-tools\fR
+.RS 4
+Container configuration files\&.
+.RE
+.PP
+\fB/usr/bin/container\fR, \fB/usr/bin/cnt\fR
+.RS 4
+Container program\&.
+.RE
+.PP
+\fB/usr/bin/container\-shell\fR, \fB/usr/bin/cntsh\fR
+.RS 4
+Container shell program\&.
+.RE
+.PP
+\fB/usr/lib/container\-tools\fR
+.RS 4
+Container commands\&.
+.RE
+.PP
+\fB/usr/share/container\-tools\fR
+.RS 4
+Container shared data\&.
+.RE
+.PP
+\fB/usr/share/doc/container\-tools\fR
+.RS 4
+Container documentation files\&.
+.RE
+.PP
+\fB/var/lib/machines\fR
+.RS 4
+Container root directory\&.
+.RE
+.PP
+\fB/var/log/container\-tools\fR
+.RS 4
+Container log files\&.
+.RE
+.SH "SEE ALSO"
+.sp
+machinectl(1), systemd\-nspawn(1)\&.
+.SH "HOMEPAGE"
+.sp
+More information about container\-tools and the Open Infrastructure project can be found on the homepage at https://open\-infrastructure\&.net\&.
+.SH "CONTACT"
+.sp
+Bug reports, feature requests, help, patches, support and everything else are welcome on the Open Infrastructure Software Mailing List <software@lists\&.open\-infrastructure\&.net>\&.
+.sp
+Debian specific bugs can also be reported in the Debian Bug Tracking System at https://bugs\&.debian\&.org\&.
+.SH "AUTHORS"
+.sp
+container\-tools was written by Daniel Baumann <daniel\&.baumann@open\-infrastructure\&.net>\&.
diff --git a/share/man/container.1.txt b/share/man/container.1.txt
index 6bd2a12..864e53f 100644
--- a/share/man/container.1.txt
+++ b/share/man/container.1.txt
@@ -74,6 +74,9 @@ The following container commands are available:
*enter*::
Enter a container namespace, see container-enter(1).
+*key*::
+ Manage GnuPG keyring for container operations, see container-key(1).
+
*limit*::
Limit ressources of a container, see container-limit(1).
diff --git a/share/scripts/curl b/share/scripts/curl
index a338020..709e59c 100755
--- a/share/scripts/curl
+++ b/share/scripts/curl
@@ -21,13 +21,14 @@ set -e
SCRIPT="${0}"
HOOKS="/etc/container-tools/hooks"
+KEYS="/etc/container-tools/keys"
MACHINES="/var/lib/machines"
-CACHE="/var/cache/container-tools/images"
+CACHE="/var/cache/container-tools/system"
Parameters ()
{
- GETOPT_LONGOPTIONS="bind:,bind-ro:,script:,name:,clean,image:,server:,password:"
- GETOPT_OPTIONS="b:,s:,n:,p:"
+ GETOPT_LONGOPTIONS="bind:,bind-ro:,script:,name:,architecture:,clean,password:,server:,setup:,system:,"
+ GETOPT_OPTIONS="b:,s:,n:,a:,p:"
PARAMETERS="$(getopt --longoptions ${GETOPT_LONGOPTIONS} --name=${SCRIPT} --options ${GETOPT_OPTIONS} --shell sh -- ${@})"
@@ -72,13 +73,18 @@ Parameters ()
shift 2
;;
+ -a|--architecture)
+ ARCHITECTURE="${2}"
+ shift 2
+ ;;
+
--clean)
CLEAN="true"
shift 1
;;
- --image)
- IMAGE="${2}"
+ -p|--password)
+ PASSWORD="${2}"
shift 2
;;
@@ -87,8 +93,13 @@ Parameters ()
shift 2
;;
- -p|--password)
- PASSWORD="${2}"
+ --setup)
+ SETUP="${2}"
+ shift 2
+ ;;
+
+ --system)
+ SYSTEM="${2}"
shift 2
;;
@@ -107,7 +118,7 @@ Parameters ()
Usage ()
{
- echo "Usage: container create -n|--name NAME -s|--script ${SCRIPT} -- [--clean] [--image IMAGE] [--server SERVER] [-p|--password PASSWORD}" >&2
+ echo "Usage: container create -n|--name NAME -s|--script ${SCRIPT} -- [--clean] [-p|--password PASSWORD] [--server SERVER] [--setup SETUP] [--system SYSTEM]" >&2
exit 1
}
@@ -136,13 +147,73 @@ then
exit 1
fi
-ARCHITECTURE="${ARCHITECTURE:-$(dpkg --print-architecture)}"
-IMAGE="${IMAGE:-debian-stretch-${ARCHITECTURE}.tar.xz}"
-SERVER="${SERVER:-https://files.open-infrastructure.net/images/container-tools/current}"
+COMPRESSIONS=""
+
+if [ -x /usr/bin/lzip ]
+then
+ COMPRESSIONS="${COMPRESSIONS} lz"
+fi
+
+if [ -x /usr/bin/xz ]
+then
+ COMPRESSIONS="${COMPRESSIONS} xz"
+fi
+
+if [ -x /bin/gzip ]
+then
+ COMPRESSIONS="${COMPRESSIONS} gz"
+fi
+
+if [ -z "${COMPRESSIONS}" ]
+then
+ echo "'${NAME}': no supported compressor available (lz, xz, gz)."
+ exit 1
+fi
+
+SERVER="${SERVER:-https://files.open-infrastructure.net/system/container/debian}"
PASSWORD="${PASSWORD:-$(dd if=/dev/urandom bs=12 count=1 2> /dev/null | base64)}"
VERSION="$(container version)"
+export SERVER
+
+Debconf ()
+{
+ # Configure local debconf
+ mkdir -p "${DEBCONF_TMPDIR}/debconf"
+
+cat > "${DEBCONF_TMPDIR}/debconf.systemrc" << EOF
+Config: configdb
+Templates: templatedb
+
+Name: config
+Driver: File
+Mode: 644
+Reject-Type: password
+Filename: ${DEBCONF_TMPDIR}/debconf/config.dat
+
+Name: passwords
+Driver: File
+Mode: 600
+Backup: false
+Required: false
+Accept-Type: password
+Filename: ${DEBCONF_TMPDIR}/debconf/passwords.dat
+
+Name: configdb
+Driver: Stack
+Stack: config, passwords
+
+Name: templatedb
+Driver: File
+Mode: 644
+Filename: ${DEBCONF_TMPDIR}/debconf/templates.dat
+EOF
+
+ DEBCONF_SYSTEMRC="${DEBCONF_TMPDIR}/debconf.systemrc"
+ export DEBCONF_SYSTEMRC
+}
+
# Pre hooks
for FILE in "${HOOKS}/pre-${SCRIPT}".* "${HOOKS}/${NAME}.pre-${SCRIPT}"
do
@@ -154,65 +225,189 @@ done
# Run
-# FIXME: Show available image directories on server
-# FIXME: Fetch debconf-choices.txt to show debconf select
-# FIXME: gpg verification against debian-keyring or local keyring
# FIXME: default server via configuration file
-echo "Downloading ${IMAGE}"
-mkdir -p "${CACHE}"
+CURL_OPTIONS=""
-if [ -e "${CACHE}/${IMAGE}" ]
+if curl -V | grep -qs http2
then
- CURL_OPTIONS="--time-cond ${CACHE}/${IMAGE}"
+ CURL_OPTIONS="${CURL_OPTIONS} --http2"
fi
-if curl -V | grep -qs http2
+if [ -z "${SYSTEM}" ]
then
- CURL_OPTIONS="${CURL_OPTIONS} --http2"
+ # Downloading container list
+ if curl --fail --head --output /dev/null --silent "${SERVER}/container-list.txt"
+ then
+ mkdir -p /tmp/container-tools
+ DEBCONF_TMPDIR="$(mktemp -d -p /tmp/container-tools -t $(basename ${0}).XXXX)"
+ export DEBCONF_TMPDIR
+
+ if [ -z "${ARCHITECTURE}" ]
+ then
+ case "$(dpkg --print-architecture)" in
+ amd64)
+ GREP_PATTERN="(amd64|i386)"
+ ;;
+ esac
+ fi
+
+ GREP_PATTERN="${GREP_PATTERN:-${ARCHITECTURE}}"
+
+ echo "Downloading $(echo ${SERVER} | awk -F/ '{ print $3 }') container list"
+ curl --fail --location --progress-bar --user-agent container-tools/${VERSION} ${CURL_OPTIONS} \
+ "${SERVER}/container-list.txt" | grep -E "${GREP_PATTERN}" > "${DEBCONF_TMPDIR}/container-list.txt"
+
+ umask 0022
+
+ Debconf
+
+ # Run debconf parts
+ for DEBCONF_SCRIPT in /usr/share/container-tools/scripts/curl.d/*
+ do
+ if [ -x "${DEBCONF_SCRIPT}" ]
+ then
+ # FIXME
+ # debconf -ocontainer-tools "${DEBCONF_SCRIPT}"
+ "${DEBCONF_SCRIPT}"
+ fi
+ done
+
+ # Read-in configuration from debconf
+ . "${DEBCONF_TMPDIR}/debconf.default"
+
+ # 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
+ fi
fi
-curl --fail --location --progress-bar --user-agent container-tools/${VERSION} ${CURL_OPTIONS} \
- "${SERVER}/${IMAGE}" -o "${CACHE}/${IMAGE}"
+for COMPRESSION in ${COMPRESSIONS}
+do
+ if curl --fail --head --output /dev/null --silent "${SERVER}/${SYSTEM}.${COMPRESSION}"
+ then
+ SYSTEM="${SYSTEM}.${COMPRESSION}"
+ break
+ fi
+done
+
+# Downloading container files
+mkdir -p "${CACHE}"
+
+SETUP="${SETUP:-$(echo ${SYSTEM} | sed -e 's|.system.tar.|.setup.tar.|')}"
-curl --fail --location --progress-bar --user-agent container-tools/${VERSION} ${CURL_OPTIONS} \
- "${SERVER}/${IMAGE}.sha512" -o "${CACHE}/${IMAGE}.sha512"
+for FILE in "${SYSTEM}" "${SYSTEM}.gpg" "${SYSTEM}.sha512" \
+ "${SETUP}" "${SETUP}.gpg" "${SETUP}.sha512"
+do
+ if curl --fail --head --output /dev/null --silent "${SERVER}/${FILE}"
+ then
+ case "${FILE}" in
+ *.sha512)
+ if [ -e "${CACHE}/$(basename ${FILE} .sha512).gpg" ]
+ then
+ continue
+ fi
+ ;;
+ esac
+
+ if [ -e "${CACHE}/${FILE}" ]
+ then
+ CURL_TIME_COND="--time-cond ${CACHE}/${FILE}"
+ else
+ CURL_TIME_COND=""
+ fi
+
+ echo "Downloading ${FILE}"
+ curl --fail --location --progress-bar --user-agent container-tools/${VERSION} ${CURL_OPTIONS} ${CURL_TIME_COND} \
+ "${SERVER}/${FILE}" -o "${CACHE}/${FILE}"
+ fi
+done
-echo -n "Verifying ${IMAGE}.sha512"
cd "${CACHE}"
-set +e
-sha512sum --check "${IMAGE}.sha512" --status
-SHA512SUM="${?}"
+for FILE in "${SYSTEM}" "${SETUP}"
+do
+ if [ ! -e "${FILE}" ]
+ then
+ continue
+ fi
-case "${SHA512SUM}" in
- 0)
- echo " ok."
- ;;
+ if [ -e "${FILE}.gpg" ]
+ then
+ echo -n "Verifying ${FILE}:"
- *)
- echo " failed."
- exit 1
- ;;
-esac
+ set +e
+ gpg --homedir "${KEYS}" --verify "${FILE}.gpg" "${FILE}" > /dev/null 2>&1
+ GNUPG="${?}"
+ set -e
-set -e
-cd "${OLDPWD}"
+ case "${GNUPG}" in
+ 0)
+ echo " gpg ok."
+ continue
+ ;;
+
+ *)
+ echo " gpg failed."
+ exit 1
+ ;;
+ esac
+ elif [ -e "${FILE}.sha512" ]
+ then
+ echo -n "Verifying ${FILE}:"
-echo "Unpacking ${IMAGE}"
-mkdir -p "${MACHINES}/${NAME}"
+ set +e
+ sha512sum --check "${FILE}.sha512" --status
+ SHA512SUM="${?}"
+ set -e
-case "${IMAGE}" in
+ case "${SHA512SUM}" in
+ 0)
+ echo " sha512 ok."
+ ;;
+
+ *)
+ echo " sha512 failed."
+ exit 1
+ ;;
+ esac
+ fi
+done
+
+cd "${OLDPWD}"
+
+case "${SYSTEM}" in
*.gz)
TAR_OPTIONS="--gzip"
+
+ if [ ! -e /bin/gzip ]
+ then
+ echo -en "\n"
+ echo "'${NAME}': /bin/lzip - no such file." >&2
+ exit 1
+ fi
;;
*.lz)
TAR_OPTIONS="--lzip"
+
+ if [ ! -e /usr/bin/lzip ]
+ then
+ echo -en "\n"
+ echo "'${NAME}': /usr/bin/lzip - no such file." >&2
+ exit 1
+ fi
;;
*.xz)
TAR_OPTIONS="--xz"
+
+ if [ ! -e /usr/bin/xz ]
+ then
+ echo -en "\n"
+ echo "'${NAME}': /usr/bin/xz - no such file." >&2
+ exit 1
+ fi
;;
*)
@@ -220,11 +415,46 @@ case "${IMAGE}" in
;;
esac
-if [ -e /usr/bin/pv ]
+for FILE in "${SYSTEM}" "${SETUP}"
+do
+ if [ ! -e "${CACHE}/${FILE}" ]
+ then
+ continue
+ fi
+
+ case "${FILE}" in
+ *.system.tar.*)
+ DIRECTORY="${MACHINES}/${NAME}"
+ ;;
+
+ *.setup.tar.*)
+ DIRECTORY="${MACHINES}/${NAME}/setup"
+ ;;
+ esac
+
+ mkdir -p "${DIRECTORY}"
+
+ if [ -e /usr/bin/pv ]
+ then
+ echo "Unpacking ${FILE}"
+ pv --format '%p' --width 77 "${CACHE}/${FILE}" | tar xf - ${TAR_OPTIONS} -C "${DIRECTORY}" --strip 1
+ else
+ echo -n "Unpacking ${FILE}:"
+ tar xf "${CACHE}/${FILE}" ${TAR_OPTIONS} -C "${DIRECTORY}" --strip 1
+ echo " ok."
+ fi
+done
+
+if [ -x "${MACHINES}/${NAME}/setup/container" ]
then
- pv --format '%p' --width 77 "${CACHE}/${IMAGE}" | tar xf - ${TAR_OPTIONS} -C "${MACHINES}/${NAME}" --strip 1
-else
- tar xf "${CACHE}/${IMAGE}" ${TAR_OPTIONS} -C "${MACHINES}/${NAME}" --strip 1
+ chroot "${MACHINES}/${NAME}" /usr/bin/env -i \
+ LC_ALL="C" PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games" TERM="${TERM}" \
+ DEBIAN_FRONTEND="dialog" DEBIAN_PRIORITY="low" \
+ DEBCONF_NONINTERACTIVE_SEEN="true" DEBCONF_NOWARNINGS="true" \
+ NAME="${NAME}" \
+ /setup/container
+
+ rm -rf "${MACHINES}/${NAME}/setup"
fi
# Creating machine-id
@@ -240,11 +470,11 @@ cp -L /etc/resolv.conf "${MACHINES}/${NAME}/etc/resolv.conf"
echo root:${PASSWORD} | chroot "${MACHINES}/${NAME}" chpasswd
echo "${NAME}: root password set to '${PASSWORD}'."
-# Reove cache
+# Remove cache
case "${CLEAN}" in
true)
- rm -f "${CACHE}/${IMAGE}"
- rm -f "${CACHE}/${IMAGE}.sha512"
+ rm -f "${CACHE}/${SYSTEM}" "${CACHE}/${SYSTEM}.sha512"
+ rm -f "${CACHE}/${SETUP}" "${CACHE}/${SETUP}.sha512"
;;
esac
diff --git a/share/scripts/curl.d/0001-debconf b/share/scripts/curl.d/0001-debconf
new file mode 100755
index 0000000..184a5ed
--- /dev/null
+++ b/share/scripts/curl.d/0001-debconf
@@ -0,0 +1,53 @@
+#!/bin/sh
+
+# container-tools - Manage systemd-nspawn containers
+# Copyright (C) 2014-2017 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/>.
+
+set -e
+
+DEBCONF_NOWARNINGS="true"
+export DEBCONF_NOWARNINGS
+
+. /usr/share/debconf/confmodule
+
+System ()
+{
+ TITLE="$(echo ${SERVER} | awk -F/ '{ print $3 }')"
+
+ SYSTEMS="$(for SYSTEM in $(cat ${DEBCONF_TMPDIR}/container-list.txt | cut -d\| -f2 | sed -e 's| |#|g'); do echo -n "$(echo ${SYSTEM} | sed -e 's|#| |g'), "; done | sed -e 's|, $||')"
+ SYSTEMS_C="$(for SYSTEM_C in $(cat ${DEBCONF_TMPDIR}/container-list.txt | cut -d\| -f1); do echo -n "${SYSTEM_C}, "; done | sed -e 's|, $||')"
+
+ db_subst cnt-curl/title TITLE "${TITLE}"
+
+ db_subst cnt-curl/system CHOICES "${SYSTEMS}"
+ db_subst cnt-curl/system CHOICES_C "${SYSTEMS_C}"
+
+ db_fset cnt-curl/system seen false
+
+ db_settitle cnt-curl/title
+ db_input high cnt-curl/system || true
+ db_go
+
+ db_get cnt-curl/system
+ SYSTEM="${RET}" # select
+
+ echo "SYSTEM=\"${SYSTEM}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
+ export SYSTEM
+}
+
+System
+
+db_stop
diff --git a/share/scripts/curl.d/0001-debconf.templates b/share/scripts/curl.d/0001-debconf.templates
new file mode 100644
index 0000000..c87e47e
--- /dev/null
+++ b/share/scripts/curl.d/0001-debconf.templates
@@ -0,0 +1,11 @@
+Template: cnt-curl/title
+Type: title
+Description: ${TITLE}
+
+Template: cnt-curl/system
+Type: select
+Default:
+Choices-C: ${CHOICES_C}
+Choices: ${CHOICES}
+Description: Container list:
+ Select the system to use for creating the container.
diff --git a/share/scripts/debconf b/share/scripts/debconf
index 38bf937..6190c31 100755
--- a/share/scripts/debconf
+++ b/share/scripts/debconf
@@ -19,6 +19,7 @@
set -e
SCRIPT="${0}"
+export SCRIPT
CONFIG="/etc/container-tools/config"
HOOKS="/etc/container-tools/hooks"
@@ -809,7 +810,7 @@ Configure_systemd_networkd ()
chroot "${DIRECTORY}" systemctl enable systemd-networkd
- for NUMBER in $(seq 0 ${NETWORK_NUMBER})
+ for NUMBER in $(seq 1 ${NETWORK_NUMBER})
do
eval IPV4_COMMENT="$`echo NETWORK${NUMBER}_IPV4_COMMENT`"
eval IPV4_METHOD="$`echo NETWORK${NUMBER}_IPV4_METHOD`"
@@ -827,22 +828,22 @@ Configure_systemd_networkd ()
IPV4_SUFFIX="$(CIDR ${IPV4_NETMASK})"
IPV4_CIDR="${IPV4_ADDRESS}/${IPV4_SUFFIX}"
-cat > "${DIRECTORY}/etc/systemd/network/eth${NUMBER}.network" << EOF
+cat > "${DIRECTORY}/etc/systemd/network/eno${NUMBER}.network" << EOF
[Match]
-Name=eth${NUMBER}
+Name=eno${NUMBER}
[Network]
EOF
if [ -n "${IPV4_COMMENT}" ]
then
- echo "Description=${IPV4_COMMENT}" >> "${DIRECTORY}/etc/systemd/network/eth${NUMBER}.network"
+ echo "Description=${IPV4_COMMENT}" >> "${DIRECTORY}/etc/systemd/network/eno${NUMBER}.network"
fi
case "${IPV4_METHOD}" in
dhcp)
-cat >> "${DIRECTORY}/etc/systemd/network/eth${NUMBER}.network" << EOF
+cat >> "${DIRECTORY}/etc/systemd/network/eno${NUMBER}.network" << EOF
DHCP=ipv4
EOF
@@ -850,7 +851,7 @@ EOF
static)
-cat >> "${DIRECTORY}/etc/systemd/network/eth${NUMBER}.network" << EOF
+cat >> "${DIRECTORY}/etc/systemd/network/eno${NUMBER}.network" << EOF
DHCP=no
Address=${IPV4_CIDR}
EOF
@@ -858,7 +859,7 @@ EOF
if [ -n "${IPV4_GATEWAY}" ]
then
-cat >> "${DIRECTORY}/etc/systemd/network/eth${NUMBER}.network" << EOF
+cat >> "${DIRECTORY}/etc/systemd/network/eno${NUMBER}.network" << EOF
Gateway=${IPV4_GATEWAY}
EOF
@@ -868,7 +869,7 @@ EOF
if [ -n "${IPV4_POST_UP}" ]
then
-cat > "${DIRECTORY}/etc/systemd/system/cnt-ipv4-post-up-eth${NUMBER}.service" << EOF
+cat > "${DIRECTORY}/etc/systemd/system/cnt-ipv4-post-up-eno${NUMBER}.service" << EOF
[Unit]
Description=container-tools IPV4_POST_UP
After=network-online.target
@@ -882,13 +883,13 @@ ExecStart=/bin/sh -c "${IPV4_POST_UP}"
WantedBy=multi-user.target
EOF
- chroot "${DIRECTORY}" systemctl enable cnt-ipv4-post-up-eth${NUMBER}.service
+ chroot "${DIRECTORY}" systemctl enable cnt-ipv4-post-up-eno${NUMBER}.service
fi
if [ -n "${IPV4_POST_DOWN}" ]
then
-cat > "${DIRECTORY}/etc/systemd/system/cnt-ipv4-post-down-eth${NUMBER}.service" << EOF
+cat > "${DIRECTORY}/etc/systemd/system/cnt-ipv4-post-down-eno${NUMBER}.service" << EOF
[Unit]
Description=container-tools IPV4_POST_DOWN
After=network.target
@@ -902,7 +903,7 @@ ExecStart=/bin/sh -c "${IPV4_POST_DOWN}"
WantedBy=multi-user.target
EOF
- chroot "${DIRECTORY}" systemctl enable cnt-ipv4-post-down-eth${NUMBER}.service
+ chroot "${DIRECTORY}" systemctl enable cnt-ipv4-post-down-eno${NUMBER}.service
fi
NUMBER="$((${NUMBER} + 1))"
@@ -932,11 +933,11 @@ Commands ()
sed -i -e "s|^cnt.auto=.*|cnt.auto=${CNT_AUTO}|g" \
-e "s|^cnt.container-server=.*|cnt.container-server=${CNT_CONTAINER_SERVER}|g" \
- -e "s|^cnt.network-bridge=.*|cnt.network-bridge=${HOST_INTERFACE_NAME}:${NETWORK0_BRIDGE:-br0}|g" \
+ -e "s|^cnt.network-bridge=.*|cnt.network-bridge=${HOST_INTERFACE_NAME}:${NETWORK0_BRIDGE:-bridge0}|g" \
-e "s|^cnt.overlay=.*|cnt.overlay=${CNT_OVERLAY}|g" \
-e "s|^bind=.*|bind=${BIND}|g" \
-e "s|^bind-ro=.*|bind-ro=${BIND_RO}|g" \
- -e "s|^network-veth-extra=.*|network-veth-extra=${HOST_INTERFACE_NAME}:eth0|g" \
+ -e "s|^network-veth-extra=.*|network-veth-extra=${HOST_INTERFACE_NAME}:eno1|g" \
"${CONFIG}/${NAME}.conf"
for NUMBER in $(seq 1 ${NETWORK_NUMBER})
@@ -951,12 +952,12 @@ Commands ()
eval HOST_INTERFACE_NAME="$`echo NETWORK${NUMBER}_VETH`"
HOST_INTERFACE_NAME="$(echo ${HOST_INTERFACE_NAME:-veth-${HOSTNAME_SHORT}-${NUMBER}})"
- CONTAINER_INTERFACE_NAME="eth${NUMBER}"
+ CONTAINER_INTERFACE_NAME="eno${NUMBER}"
sed -i -e "/^register=.*/ a network-veth-extra=${HOST_INTERFACE_NAME}:${CONTAINER_INTERFACE_NAME}" "${CONFIG}/${NAME}.conf"
eval BRIDGE="$`echo NETWORK${NUMBER}_BRIDGE`"
- sed -i -e "/^register=.*/ a cnt.network-bridge=${HOST_INTERFACE_NAME}:${BRIDGE:-br${NUMBER}}" "${CONFIG}/${NAME}.conf"
+ sed -i -e "/^register=.*/ a cnt.network-bridge=${HOST_INTERFACE_NAME}:${BRIDGE:-bridge${NUMBER}}" "${CONFIG}/${NAME}.conf"
done
# Setting root password
@@ -971,24 +972,10 @@ Commands ()
umask 0022
-# Get distributor from template filename
-MODE="$(basename ${SCRIPT})"
-
-case "${MODE}" in
- debconf)
- MODE="debian"
- ;;
-esac
-
-export MODE
-
-CACHE="/var/cache/container-tools/${MODE}"
-SYSTEM="${MACHINES}/${NAME}"
+export NAME
Debconf
-export NAME
-
# Pre hooks
for FILE in "${HOOKS}/pre-${SCRIPT}".* "${HOOKS}/${NAME}.pre-${SCRIPT}"
do
@@ -999,19 +986,22 @@ do
done
# Run debconf parts
-for SCRIPT in /usr/share/container-tools/scripts/debconf.d/*
+for DEBCONF_SCRIPT in /usr/share/container-tools/scripts/debconf.d/*
do
- if [ -x "${SCRIPT}" ]
+ if [ -x "${DEBCONF_SCRIPT}" ]
then
# FIXME
- # debconf -ocontainer-tools "${SCRIPT}"
- "${SCRIPT}"
+ # debconf -ocontainer-tools "${DEBCONF_SCRIPT}"
+ "${DEBCONF_SCRIPT}"
fi
done
# Read-in configuration from debconf
. "${DEBCONF_TMPDIR}/debconf.default"
+CACHE="/var/cache/container-tools/${MODE}"
+SYSTEM="${MACHINES}/${NAME}"
+
## Generic parts
if [ ! -e "${CACHE}/${DISTRIBUTION}_${ARCHITECTURE}" ]
then
diff --git a/share/scripts/debconf.d/0003-debconf b/share/scripts/debconf.d/0003-debconf
index 8e78b3e..2592cf6 100755
--- a/share/scripts/debconf.d/0003-debconf
+++ b/share/scripts/debconf.d/0003-debconf
@@ -23,6 +23,26 @@ export DEBCONF_NOWARNINGS
. /usr/share/debconf/confmodule
+Mode ()
+{
+ db_get cnt-debconf/mode
+ MODE="${RET}" # select
+
+ if [ -z "${MODE}" ]
+ then
+ MODE="$(basename ${SCRIPT})"
+
+ case "${MODE}" in
+ debconf)
+ MODE="debian"
+ ;;
+ esac
+ fi
+
+ echo "MODE=\"${MODE}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
+ export MODE
+}
+
Distribution ()
{
db_get cnt-debconf/distribution
@@ -596,7 +616,7 @@ Packages ()
Local_archives ()
{
- NUMBER="0"
+ NUMBER="1"
while db_get cnt-debconf/archive${NUMBER}/repository && [ "${RET}" ]
do
@@ -674,10 +694,10 @@ Network_defaults ()
# * add support for bridges (make interface configuration more generic?)
HOSTNAME_SHORT="$(echo veth-$(echo ${NAME} | cut -c-8)-0)"
- VETH_NAME="$(echo ${HOSTNAME_SHORT:-veth0})"
+ VETH_NAME="${HOSTNAME_SHORT}"
NETWORK0_VETH="${NETWORK0_VETH:-$VETH_NAME}"
- NETWORK0_BRIDGE="${NETWORK0_BRIDGE:-br0}"
+ NETWORK0_BRIDGE="${NETWORK0_BRIDGE:-bridge0}"
NETWORK0_IPV4_METHOD="${NETWORK0_IPV4_METHOD:-dhcp}"
NETWORK0_IPV4_ADDRESS="${NETWORK0_IPV4_ADDRESS:-192.168.1.2}"
NETWORK0_IPV4_NETMASK="${NETWORK0_IPV4_NETMASK:-255.255.255.0}"
@@ -696,31 +716,31 @@ Network_defaults ()
Network ()
{
- db_get cnt-debconf/network0/bridge
+ db_get cnt-debconf/network1/bridge
NETWORK0_BRIDGE="${RET}" # string (w/o empty)
- db_get cnt-debconf/network0/veth
+ db_get cnt-debconf/network1/veth
NETWORK0_VETH="${RET}" # string (w/o empty)
- db_get cnt-debconf/network0/ipv4-method
+ db_get cnt-debconf/network1/ipv4-method
NETWORK0_IPV4_METHOD="${RET}" # select
- db_get cnt-debconf/network0/ipv4-comment
+ db_get cnt-debconf/network1/ipv4-comment
NETWORK0_IPV4_COMMENT="${RET}" # string (w/ empty)
- db_get cnt-debconf/network0/ipv4-address
+ db_get cnt-debconf/network1/ipv4-address
NETWORK0_IPV4_ADDRESS="${RET}" # string (w/o empty)
- db_get cnt-debconf/network0/ipv4-gateway
+ db_get cnt-debconf/network1/ipv4-gateway
NETWORK0_IPV4_GATEWAY="${RET}" # string (w/ empty)
- db_get cnt-debconf/network0/ipv4-netmask
+ db_get cnt-debconf/network1/ipv4-netmask
NETWORK0_IPV4_NETMASK="${RET}" # string (w/o empty)
- db_get cnt-debconf/network0/ipv4-post-up
+ db_get cnt-debconf/network1/ipv4-post-up
NETWORK0_IPV4_POST_UP="${RET}" # string (w/ empty)
- db_get cnt-debconf/network0/ipv4-post-down
+ db_get cnt-debconf/network1/ipv4-post-down
NETWORK0_IPV4_POST_DOWN="${RET}" # string (w/ empty)
db_get cnt-debconf/nameserver/server
@@ -737,32 +757,32 @@ Network ()
Network_defaults
- db_set cnt-debconf/network0/bridge "${NETWORK0_BRIDGE}"
- db_fset cnt-debconf/network0/bridge seen false
+ db_set cnt-debconf/network1/bridge "${NETWORK0_BRIDGE}"
+ db_fset cnt-debconf/network1/bridge seen false
- db_set cnt-debconf/network0/veth "${NETWORK0_VETH}"
- db_fset cnt-debconf/network0/veth seen false
+ db_set cnt-debconf/network1/veth "${NETWORK0_VETH}"
+ db_fset cnt-debconf/network1/veth seen false
- db_set cnt-debconf/network0/ipv4-method "${NETWORK0_IPV4_METHOD}"
- db_fset cnt-debconf/network0/ipv4-method seen false
+ db_set cnt-debconf/network1/ipv4-method "${NETWORK0_IPV4_METHOD}"
+ db_fset cnt-debconf/network1/ipv4-method seen false
- db_set cnt-debconf/network0/ipv4-comment "${NETWORK0_IPV4_COMMENT}"
- db_fset cnt-debconf/network0/ipv4-comment seen false
+ db_set cnt-debconf/network1/ipv4-comment "${NETWORK0_IPV4_COMMENT}"
+ db_fset cnt-debconf/network1/ipv4-comment seen false
- db_set cnt-debconf/network0/ipv4-address "${NETWORK0_IPV4_ADDRESS}"
- db_fset cnt-debconf/network0/ipv4-address seen false
+ db_set cnt-debconf/network1/ipv4-address "${NETWORK0_IPV4_ADDRESS}"
+ db_fset cnt-debconf/network1/ipv4-address seen false
- db_set cnt-debconf/network0/ipv4-gateway "${NETWORK0_IPV4_GATEWAY}"
- db_fset cnt-debconf/network0/ipv4-gateway seen false
+ db_set cnt-debconf/network1/ipv4-gateway "${NETWORK0_IPV4_GATEWAY}"
+ db_fset cnt-debconf/network1/ipv4-gateway seen false
- db_set cnt-debconf/network0/ipv4-netmask "${NETWORK0_IPV4_NETMASK}"
- db_fset cnt-debconf/network0/ipv4-netmask seen false
+ db_set cnt-debconf/network1/ipv4-netmask "${NETWORK0_IPV4_NETMASK}"
+ db_fset cnt-debconf/network1/ipv4-netmask seen false
- db_set cnt-debconf/network0/ipv4-post-up "${NETWORK0_IPV4_POST_UP}"
- db_fset cnt-debconf/network0/ipv4-post-up seen false
+ db_set cnt-debconf/network1/ipv4-post-up "${NETWORK0_IPV4_POST_UP}"
+ db_fset cnt-debconf/network1/ipv4-post-up seen false
- db_set cnt-debconf/network0/ipv4-post-down "${NETWORK0_IPV4_POST_DOWN}"
- db_fset cnt-debconf/network0/ipv4-post-down seen false
+ db_set cnt-debconf/network1/ipv4-post-down "${NETWORK0_IPV4_POST_DOWN}"
+ db_fset cnt-debconf/network1/ipv4-post-down seen false
db_set cnt-debconf/nameserver/server "${NAMESERVER_SERVER}"
db_fset cnt-debconf/nameserver/server seen false
@@ -777,16 +797,16 @@ Network ()
db_fset cnt-debconf/nameserver/options seen false
db_settitle cnt-debconf/title
- db_input high cnt-debconf/network0/ipv4-method || true
+ db_input high cnt-debconf/network1/ipv4-method || true
db_go
- db_get cnt-debconf/network0/bridge
+ db_get cnt-debconf/network1/bridge
NETWORK0_BRIDGE="${RET}" # select
- db_get cnt-debconf/network0/veth
+ db_get cnt-debconf/network1/veth
NETWORK0_VETH="${RET}" # select
- db_get cnt-debconf/network0/ipv4-method
+ db_get cnt-debconf/network1/ipv4-method
NETWORK0_IPV4_METHOD="${RET}" # select
case "${NETWORK0_IPV4_METHOD}" in
@@ -795,27 +815,27 @@ Network ()
static)
db_settitle cnt-debconf/title
- db_input high cnt-debconf/network0/ipv4-comment || true
+ db_input high cnt-debconf/network1/ipv4-comment || true
db_go
db_settitle cnt-debconf/title
- db_input high cnt-debconf/network0/ipv4-address || true
+ db_input high cnt-debconf/network1/ipv4-address || true
db_go
db_settitle cnt-debconf/title
- db_input high cnt-debconf/network0/ipv4-gateway || true
+ db_input high cnt-debconf/network1/ipv4-gateway || true
db_go
db_settitle cnt-debconf/title
- db_input high cnt-debconf/network0/ipv4-netmask || true
+ db_input high cnt-debconf/network1/ipv4-netmask || true
db_go
db_settitle cnt-debconf/title
- db_input high cnt-debconf/network0/ipv4-post-up || true
+ db_input high cnt-debconf/network1/ipv4-post-up || true
db_go
db_settitle cnt-debconf/title
- db_input high cnt-debconf/network0/ipv4-post-down || true
+ db_input high cnt-debconf/network1/ipv4-post-down || true
db_go
db_settitle cnt-debconf/title
@@ -824,7 +844,7 @@ Network ()
;;
esac
- NUMBER="0"
+ NUMBER="1"
while db_get cnt-debconf/network${NUMBER}/ipv4-method && [ "${RET}" ]
do
@@ -894,7 +914,7 @@ Network ()
echo "NETWORK_NUMBER=\"${NETWORK_NUMBER}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
- for NUMBER in $(seq 0 ${NETWORK_NUMBER})
+ for NUMBER in $(seq 1 ${NETWORK_NUMBER})
do
eval BRIDGE="$`echo NETWORK${NUMBER}_BRIDGE`"
echo "NETWORK${NUMBER}_BRIDGE=\"${BRIDGE}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
@@ -1044,6 +1064,8 @@ Internal_options ()
echo "CNT_OVERLAY=\"${CNT_OVERLAY}\"" >> "${DEBCONF_TMPDIR}/debconf.default"
}
+Mode
+
Distribution
Parent_distribution
diff --git a/share/scripts/debconf.d/0003-debconf.templates b/share/scripts/debconf.d/0003-debconf.templates
index e46fa88..e3dbc24 100644
--- a/share/scripts/debconf.d/0003-debconf.templates
+++ b/share/scripts/debconf.d/0003-debconf.templates
@@ -2,6 +2,14 @@ Template: cnt-debconf/title
Type: title
Description: container-tools
+Template: cnt-debconf/mode
+Type: select
+Default:
+Choices-C: ${CHOICES_C}
+Choices: ${CHOICES}
+Description: Mode
+ Mode.
+
Template: cnt-debconf/distribution
Type: select
Default:
@@ -92,19 +100,19 @@ Default:
Description: Root password
Root password.
-Template: cnt-debconf/network0/bridge
+Template: cnt-debconf/network1/bridge
Type: string
Default:
Description: Bridge
Bridge.
-Template: cnt-debconf/network0/veth
+Template: cnt-debconf/network1/veth
Type: string
Default:
Description: Veth name
Veth name.
-Template: cnt-debconf/network0/ipv4-method
+Template: cnt-debconf/network1/ipv4-method
Type: select
Choices: dhcp, static, none
Default:
@@ -114,7 +122,7 @@ Description: Ethernet Interface Method (IPv4)?
This defaults to dhcp and will require that you run a dhcp-server in your
network.
-Template: cnt-debconf/network0/ipv4-comment
+Template: cnt-debconf/network1/ipv4-comment
Type: string
Default:
Description: Ethernet Interface Comment (IPv4)?
@@ -122,7 +130,7 @@ Description: Ethernet Interface Comment (IPv4)?
.
This defaults to empty.
-Template: cnt-debconf/network0/ipv4-address
+Template: cnt-debconf/network1/ipv4-address
Type: string
Default:
Description: Ethernet IP Address (IPv4)?
@@ -130,7 +138,7 @@ Description: Ethernet IP Address (IPv4)?
.
This defaults to 192.168.1.2.
-Template: cnt-debconf/network0/ipv4-gateway
+Template: cnt-debconf/network1/ipv4-gateway
Type: string
Default:
Description: Ethernet Gateway Address (IPv4)?
@@ -138,7 +146,7 @@ Description: Ethernet Gateway Address (IPv4)?
.
This defaults to empty.
-Template: cnt-debconf/network0/ipv4-netmask
+Template: cnt-debconf/network1/ipv4-netmask
Type: string
Default:
Description: Ethernet Network Mask (IPv4)?
@@ -146,19 +154,19 @@ Description: Ethernet Network Mask (IPv4)?
.
This defaults to empty.
-Template: cnt-debconf/network0/ipv4-post-up
+Template: cnt-debconf/network1/ipv4-post-up
Type: string
Default:
Description: Ethernet post-up Command (IPv4)?
- What should be the post-up command for eth0?
+ What should be the post-up command for eno1?
.
This defaults to empty.
-Template: cnt-debconf/network0/ipv4-post-down
+Template: cnt-debconf/network1/ipv4-post-down
Type: string
Default:
Description: Ethernet post-down Command (IPv4)?
- What should be the post-down command for eth0?
+ What should be the post-down command for eno1?
.
This defaults to empty.