From 9c257ffef25f49b1ca6ac4b0eea325eecbec52c8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 4 Jan 2017 11:41:50 +0100 Subject: Adding upstream version 20170101. Signed-off-by: Daniel Baumann --- share/bash-completion/container | 208 +++++++++++++-------------- share/doc/HOST-SETUP.txt | 2 +- share/doc/asciicast/introduction.sh | 2 +- share/man/Makefile | 2 +- share/man/container-auto.1.txt | 5 +- share/man/container-console.1.txt | 2 +- share/man/container-create-curl.1.txt | 2 +- share/man/container-create-debconf.1.txt | 2 +- share/man/container-create-debootstrap.1.txt | 2 +- share/man/container-create.1.txt | 2 +- share/man/container-enter.1.txt | 2 +- share/man/container-limit.1.txt | 2 +- share/man/container-list.1.txt | 2 +- share/man/container-move.1.txt | 2 +- share/man/container-remove.1.txt | 2 +- share/man/container-restart.1.txt | 2 +- share/man/container-shell.1.txt | 2 +- share/man/container-start.1.txt | 2 +- share/man/container-stop.1.txt | 2 +- share/man/container-tools.7.txt | 4 +- share/man/container-version.1.txt | 2 +- share/man/container.1.txt | 2 +- share/scripts/curl | 2 +- share/scripts/debconf | 2 +- share/scripts/debconf.d/0001-preseed-file | 2 +- share/scripts/debconf.d/0002-preseed-debconf | 2 +- share/scripts/debconf.d/0003-debconf | 2 +- share/scripts/debootstrap | 2 +- 28 files changed, 128 insertions(+), 139 deletions(-) (limited to 'share') diff --git a/share/bash-completion/container b/share/bash-completion/container index 8d54ba4..0bc22c0 100644 --- a/share/bash-completion/container +++ b/share/bash-completion/container @@ -36,218 +36,204 @@ _container() fi case "${cmd}" in + auto) + opts="-f --force -s --start -t --stop" + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 + ;; + console) - case "${cur}" in - -*) - opts="-n --name" + case "${prev}" in + -n|--name) + opts=$(container list -s -f shell) COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 ;; *) - case "${prev}" in - -n|--name) - opts=$(container list -s -f shell) - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - esac + opts="-n --name" + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 ;; esac ;; create) - case "${cur}" in - -*) - opts="-n --name -c --capability -d --drop-capability -s --script -b --bind" + case "${prev}" in + -n|--name) + opts=$(cd /etc/container-tools/debconf 2>/dev/null && ls *.cfg 2>/dev/null | sed -e 's/.cfg$//g') + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 + ;; + + -s|--script) + opts=$(cd /usr/share/container-tools/scripts && find -maxdepth 1 -not -type d -and -not -name 'default' -and -not -name 'debconf' -and -not -name '*.d' -printf '%P\n' | sort) COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 ;; *) - case "${prev}" in - -n|--name) - opts=$(cd /srv/container/container-tools/debconf 2>/dev/null && ls *.cfg 2>/dev/null | sed -e 's/.cfg$//g') - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - - -s|--script) - opts=$(cd /usr/share/container-tools/scripts && find -maxdepth 1 -not -type d -and -not -name 'default' -and -not -name 'debconf' -and -not -name '*.d' -printf '%P\n' | sort) - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - esac + opts="-n --name -c --capability -d --drop-capability -s --script -b --bind" + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 ;; esac ;; enter) - case "${cur}" in - -*) - opts="-n --name" + case "${prev}" in + -n|--name) + opts=$(container list -s -f shell) COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 ;; *) - case "${prev}" in - -n|--name) - opts=$(container list -s -f shell) - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - esac + opts="-n --name" + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 ;; esac ;; limit) - case "${cur}" in - -*) - 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" + case "${prev}" in + -n|--name) + opts=$(container list -a -f shell) COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 ;; *) - case "${prev}" in - -n|--name) - opts=$(container list -a -f shell) - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - esac + 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" + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 ;; esac ;; list|ls) - case "${cur}" in - -*) + case "${prev}" in + -h|--host) + opts="true false $(hostname -f)" + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 + ;; + + -f|--format) + opts="cli csv json nwdiag shell yaml xml" + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 + ;; + + *) opts="-a --all -f --format -h --host -o --other -s --started -t --stopped" COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 ;; + esac + ;; + + move|mv) + case "${prev}" in + -o|--old) + opts=$(container list -t -f shell) + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 + ;; *) - case "${prev}" in - -h|--host) - opts="true false $(hostname -f)" - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - - -f|--format) - opts="cli csv json nwdiag shell yaml xml" - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - esac + opts="-f --force -n --new -o --old" + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 ;; esac ;; remove|rm) - case "${cur}" in - -*) - opts="-n --name -f --force" + case "${prev}" in + -n|--name) + opts=$(container list -t -f shell) COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 ;; *) - case "${prev}" in - -n|--name) - opts=$(container list -t -f shell) - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - esac + opts="-n --name -f --force" + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 ;; esac ;; restart) - case "${cur}" in - -*) - opts="-n --name" + case "${prev}" in + -n|--name) + opts=$(container list -s -f shell) COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 ;; *) - case "${prev}" in - -n|--name) - opts=$(container list -s -f shell) - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - esac + opts="-n --name" + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 ;; esac ;; start) - case "${cur}" in - -*) - opts="-n --name" + case "${prev}" in + -n|--name) + opts=$(container list -t -f shell) COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 ;; *) - case "${prev}" in - -n|--name) - opts=$(container list -t -f shell) - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - esac + opts="-n --name" + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 ;; esac ;; status) - case "${cur}" in - -*) - opts="-n --name" + case "${prev}" in + -n|--name) + opts=$(container list -t -f shell) COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 ;; *) - case "${prev}" in - -n|--name) - opts=$(container list -t -f shell) - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - esac + opts="-n --name" + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 ;; esac ;; stop) - case "${cur}" in - -*) - opts="-n --name -f --force" + case "${prev}" in + -n|--name) + opts=$(container list -s -f shell) COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 ;; *) - case "${prev}" in - -n|--name) - opts=$(container list -s -f shell) - COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) - return 0 - ;; - esac + opts="-n --name -f --force" + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 ;; esac ;; + version) + return 0 + ;; + *) local commands=$(cd /usr/lib/container-tools/container 2>/dev/null && find * -type f -print) COMPREPLY=( $(compgen -W "${commands}" -- ${cur}) ) diff --git a/share/doc/HOST-SETUP.txt b/share/doc/HOST-SETUP.txt index c77f829..73d1ce1 100644 --- a/share/doc/HOST-SETUP.txt +++ b/share/doc/HOST-SETUP.txt @@ -5,7 +5,7 @@ container-tools: Host Setup 1. Debian Packages ------------------- -apt install bridge-utils ifenslave vlan +apt install net-tools bridge-utils ifenslave vlan 2. Boot Parameters diff --git a/share/doc/asciicast/introduction.sh b/share/doc/asciicast/introduction.sh index 18dfdaf..5341075 100755 --- a/share/doc/asciicast/introduction.sh +++ b/share/doc/asciicast/introduction.sh @@ -1,7 +1,7 @@ #!/bin/sh # container-tools - Manage systemd-nspawn containers -# Copyright (C) 2014-2016 Daniel Baumann +# Copyright (C) 2014-2017 Daniel Baumann # # 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 diff --git a/share/man/Makefile b/share/man/Makefile index decf333..5141ced 100644 --- a/share/man/Makefile +++ b/share/man/Makefile @@ -1,7 +1,7 @@ # Makefile # container-tools - Manage systemd-nspawn containers -# Copyright (C) 2014-2016 Daniel Baumann +# Copyright (C) 2014-2017 Daniel Baumann # # 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 diff --git a/share/man/container-auto.1.txt b/share/man/container-auto.1.txt index 0eb76d2..5aaf0d1 100644 --- a/share/man/container-auto.1.txt +++ b/share/man/container-auto.1.txt @@ -1,5 +1,5 @@ // container-tools - Manage systemd-nspawn containers -// Copyright (C) 2014-2016 Daniel Baumann +// Copyright (C) 2014-2017 Daniel Baumann // // 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 @@ -41,6 +41,9 @@ OPTIONS ------- The following container options are available: +*-f, --force*:: + Removing stray lock file if existing. + *-s, --start*:: Start all container on the host system. diff --git a/share/man/container-console.1.txt b/share/man/container-console.1.txt index 7b25125..add4fc0 100644 --- a/share/man/container-console.1.txt +++ b/share/man/container-console.1.txt @@ -1,5 +1,5 @@ // container-tools - Manage systemd-nspawn containers -// Copyright (C) 2014-2016 Daniel Baumann +// Copyright (C) 2014-2017 Daniel Baumann // // 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 diff --git a/share/man/container-create-curl.1.txt b/share/man/container-create-curl.1.txt index e046b24..a1bd487 100644 --- a/share/man/container-create-curl.1.txt +++ b/share/man/container-create-curl.1.txt @@ -1,5 +1,5 @@ // container-tools - Manage systemd-nspawn containers -// Copyright (C) 2014-2016 Daniel Baumann +// Copyright (C) 2014-2017 Daniel Baumann // // 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 diff --git a/share/man/container-create-debconf.1.txt b/share/man/container-create-debconf.1.txt index a51dfef..2b5c37c 100644 --- a/share/man/container-create-debconf.1.txt +++ b/share/man/container-create-debconf.1.txt @@ -1,5 +1,5 @@ // container-tools - Manage systemd-nspawn containers -// Copyright (C) 2014-2016 Daniel Baumann +// Copyright (C) 2014-2017 Daniel Baumann // // 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 diff --git a/share/man/container-create-debootstrap.1.txt b/share/man/container-create-debootstrap.1.txt index 9de3f94..5b3b815 100644 --- a/share/man/container-create-debootstrap.1.txt +++ b/share/man/container-create-debootstrap.1.txt @@ -1,5 +1,5 @@ // container-tools - Manage systemd-nspawn containers -// Copyright (C) 2014-2016 Daniel Baumann +// Copyright (C) 2014-2017 Daniel Baumann // // 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 diff --git a/share/man/container-create.1.txt b/share/man/container-create.1.txt index 0fd5187..9176b84 100644 --- a/share/man/container-create.1.txt +++ b/share/man/container-create.1.txt @@ -1,5 +1,5 @@ // container-tools - Manage systemd-nspawn containers -// Copyright (C) 2014-2016 Daniel Baumann +// Copyright (C) 2014-2017 Daniel Baumann // // 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 diff --git a/share/man/container-enter.1.txt b/share/man/container-enter.1.txt index 42a7211..43d1721 100644 --- a/share/man/container-enter.1.txt +++ b/share/man/container-enter.1.txt @@ -1,5 +1,5 @@ // container-tools - Manage systemd-nspawn containers -// Copyright (C) 2014-2016 Daniel Baumann +// Copyright (C) 2014-2017 Daniel Baumann // // 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 diff --git a/share/man/container-limit.1.txt b/share/man/container-limit.1.txt index 9fc9cba..f942fba 100644 --- a/share/man/container-limit.1.txt +++ b/share/man/container-limit.1.txt @@ -1,5 +1,5 @@ // container-tools - Manage systemd-nspawn containers -// Copyright (C) 2014-2016 Daniel Baumann +// Copyright (C) 2014-2017 Daniel Baumann // // 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 diff --git a/share/man/container-list.1.txt b/share/man/container-list.1.txt index d964c4e..abb4c8f 100644 --- a/share/man/container-list.1.txt +++ b/share/man/container-list.1.txt @@ -1,5 +1,5 @@ // container-tools - Manage systemd-nspawn containers -// Copyright (C) 2014-2016 Daniel Baumann +// Copyright (C) 2014-2017 Daniel Baumann // // 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 diff --git a/share/man/container-move.1.txt b/share/man/container-move.1.txt index 43e04bc..0c682d3 100644 --- a/share/man/container-move.1.txt +++ b/share/man/container-move.1.txt @@ -1,5 +1,5 @@ // container-tools - Manage systemd-nspawn containers -// Copyright (C) 2014-2016 Daniel Baumann +// Copyright (C) 2014-2017 Daniel Baumann // // 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 diff --git a/share/man/container-remove.1.txt b/share/man/container-remove.1.txt index 843fa5e..917311d 100644 --- a/share/man/container-remove.1.txt +++ b/share/man/container-remove.1.txt @@ -1,5 +1,5 @@ // container-tools - Manage systemd-nspawn containers -// Copyright (C) 2014-2016 Daniel Baumann +// Copyright (C) 2014-2017 Daniel Baumann // // 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 diff --git a/share/man/container-restart.1.txt b/share/man/container-restart.1.txt index 2aed923..c2b2d39 100644 --- a/share/man/container-restart.1.txt +++ b/share/man/container-restart.1.txt @@ -1,5 +1,5 @@ // container-tools - Manage systemd-nspawn containers -// Copyright (C) 2014-2016 Daniel Baumann +// Copyright (C) 2014-2017 Daniel Baumann // // 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 diff --git a/share/man/container-shell.1.txt b/share/man/container-shell.1.txt index 38a8034..6d792b8 100644 --- a/share/man/container-shell.1.txt +++ b/share/man/container-shell.1.txt @@ -1,5 +1,5 @@ // container-tools - Manage systemd-nspawn containers -// Copyright (C) 2014-2016 Daniel Baumann +// Copyright (C) 2014-2017 Daniel Baumann // // 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 diff --git a/share/man/container-start.1.txt b/share/man/container-start.1.txt index 64c4b3c..5210d08 100644 --- a/share/man/container-start.1.txt +++ b/share/man/container-start.1.txt @@ -1,5 +1,5 @@ // container-tools - Manage systemd-nspawn containers -// Copyright (C) 2014-2016 Daniel Baumann +// Copyright (C) 2014-2017 Daniel Baumann // // 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 diff --git a/share/man/container-stop.1.txt b/share/man/container-stop.1.txt index 07426af..95c67e4 100644 --- a/share/man/container-stop.1.txt +++ b/share/man/container-stop.1.txt @@ -1,5 +1,5 @@ // container-tools - Manage systemd-nspawn containers -// Copyright (C) 2014-2016 Daniel Baumann +// Copyright (C) 2014-2017 Daniel Baumann // // 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 diff --git a/share/man/container-tools.7.txt b/share/man/container-tools.7.txt index b6c83d6..9f9aba4 100644 --- a/share/man/container-tools.7.txt +++ b/share/man/container-tools.7.txt @@ -1,5 +1,5 @@ // container-tools - Manage systemd-nspawn containers -// Copyright (C) 2014-2016 Daniel Baumann +// Copyright (C) 2014-2017 Daniel Baumann // // 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 @@ -48,7 +48,7 @@ INSTALLATION SOURCE ~~~~~~ - 1. sudo apt install asciidoc git docbook-xml docbook-xsl libxml2-utils make xsltproc dbus systemd-container + 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 diff --git a/share/man/container-version.1.txt b/share/man/container-version.1.txt index bb11d40..d3a59f8 100644 --- a/share/man/container-version.1.txt +++ b/share/man/container-version.1.txt @@ -1,5 +1,5 @@ // container-tools - Manage systemd-nspawn containers -// Copyright (C) 2014-2016 Daniel Baumann +// Copyright (C) 2014-2017 Daniel Baumann // // 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 diff --git a/share/man/container.1.txt b/share/man/container.1.txt index f76bbda..7708c6a 100644 --- a/share/man/container.1.txt +++ b/share/man/container.1.txt @@ -1,5 +1,5 @@ // container-tools - Manage systemd-nspawn containers -// Copyright (C) 2014-2016 Daniel Baumann +// Copyright (C) 2014-2017 Daniel Baumann // // 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 diff --git a/share/scripts/curl b/share/scripts/curl index 69badd9..67691e3 100755 --- a/share/scripts/curl +++ b/share/scripts/curl @@ -1,7 +1,7 @@ #!/bin/sh # container-tools - Manage systemd-nspawn containers -# Copyright (C) 2014-2016 Daniel Baumann +# Copyright (C) 2014-2017 Daniel Baumann # # 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 diff --git a/share/scripts/debconf b/share/scripts/debconf index 72e9c85..5fc9542 100755 --- a/share/scripts/debconf +++ b/share/scripts/debconf @@ -1,7 +1,7 @@ #!/bin/sh # container-tools - Manage systemd-nspawn containers -# Copyright (C) 2014-2016 Daniel Baumann +# Copyright (C) 2014-2017 Daniel Baumann # # 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 diff --git a/share/scripts/debconf.d/0001-preseed-file b/share/scripts/debconf.d/0001-preseed-file index 03976d2..663fdc8 100755 --- a/share/scripts/debconf.d/0001-preseed-file +++ b/share/scripts/debconf.d/0001-preseed-file @@ -1,7 +1,7 @@ #!/bin/sh # container-tools - Manage systemd-nspawn containers -# Copyright (C) 2014-2016 Daniel Baumann +# Copyright (C) 2014-2017 Daniel Baumann # # 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 diff --git a/share/scripts/debconf.d/0002-preseed-debconf b/share/scripts/debconf.d/0002-preseed-debconf index 7020431..05b9379 100755 --- a/share/scripts/debconf.d/0002-preseed-debconf +++ b/share/scripts/debconf.d/0002-preseed-debconf @@ -1,7 +1,7 @@ #!/bin/sh # container-tools - Manage systemd-nspawn containers -# Copyright (C) 2014-2016 Daniel Baumann +# Copyright (C) 2014-2017 Daniel Baumann # # 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 diff --git a/share/scripts/debconf.d/0003-debconf b/share/scripts/debconf.d/0003-debconf index 77dc030..1364bd0 100755 --- a/share/scripts/debconf.d/0003-debconf +++ b/share/scripts/debconf.d/0003-debconf @@ -1,7 +1,7 @@ #!/bin/sh # container-tools - Manage systemd-nspawn containers -# Copyright (C) 2014-2016 Daniel Baumann +# Copyright (C) 2014-2017 Daniel Baumann # # 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 diff --git a/share/scripts/debootstrap b/share/scripts/debootstrap index 2da573d..ecf167c 100755 --- a/share/scripts/debootstrap +++ b/share/scripts/debootstrap @@ -1,7 +1,7 @@ #!/bin/sh # container-tools - Manage systemd-nspawn containers -# Copyright (C) 2014-2016 Daniel Baumann +# Copyright (C) 2014-2017 Daniel Baumann # # 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 -- cgit v1.2.3