summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
Diffstat (limited to 'share')
-rw-r--r--share/bash-completion/container-tools215
-rw-r--r--share/doc/examples/cairon-backports.cfg4
-rw-r--r--share/man/container-limit.1.txt6
-rw-r--r--share/man/container-list.1.txt6
-rw-r--r--share/man/container-tools.7.txt7
-rwxr-xr-xshare/scripts/debconf4
-rwxr-xr-xshare/scripts/debconf.d/0003-debconf4
-rw-r--r--share/systemd/container-auto.service1
-rw-r--r--share/systemd/container@.service1
9 files changed, 237 insertions, 11 deletions
diff --git a/share/bash-completion/container-tools b/share/bash-completion/container-tools
new file mode 100644
index 0000000..219fd2f
--- /dev/null
+++ b/share/bash-completion/container-tools
@@ -0,0 +1,215 @@
+# Open Infrastructure: container-tools
+# Copyright (C) 2016 Andreas Kreuzer <andreas.kreuzer@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()
+{
+ local cur prev cmd opts
+ COMPREPLY=()
+ cur="${COMP_WORDS[COMP_CWORD]}"
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
+
+ if [ ${COMP_CWORD} -gt 0 ]
+ then
+ cmd="${COMP_WORDS[1]}"
+ fi
+
+ if [ "${prev}" = "--" ]
+ then
+ compopt -o bashdefault
+ COMPREPLY=( $(compgen -c -- $cur) )
+ return 0
+ fi
+
+ case "${cmd}" in
+ console)
+ case "${cur}" in
+ -*)
+ opts="-n --name"
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+
+ *)
+ case "${prev}" in
+ -n|--name)
+ opts=$(container list -s -f short)
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ create)
+ case "${cur}" in
+ -*)
+ opts="-n --name -c --capability -d --drop-capability -s --script -b --bind"
+ 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="debootstrap debconf default"
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+ esac
+ ;;
+ 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"
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+
+ *)
+ case "${prev}" in
+ -n|--name)
+ opts=$(container list -a -f short)
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ list)
+ case "${cur}" in
+ -*)
+ opts="-a --all -f --format -h --host -s --started -t --stopped"
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+
+ *)
+ case "${prev}" in
+ -h|--host)
+ opts="true false $(hostname -f)"
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ remove)
+ case "${cur}" in
+ -*)
+ opts="-n --name -f --force"
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+
+ *)
+ case "${prev}" in
+ -n|--name)
+ opts=$(container list -a -f short)
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ restart)
+ case "${cur}" in
+ -*)
+ opts="-n --name"
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+
+ *)
+ case "${prev}" in
+ -n|--name)
+ opts=$(container list -s -f short)
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ start)
+ case "${cur}" in
+ -*)
+ opts="-n --name"
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+
+ *)
+ case "${prev}" in
+ -n|--name)
+ opts=$(container list -t -f short)
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ stop)
+ case "${cur}" in
+ -*)
+ opts="-n --name -f --force"
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+
+ *)
+ case "${prev}" in
+ -n|--name)
+ opts=$(container list -s -f short)
+ COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
+ return 0
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ *)
+ local commands=$(ls /usr/lib/container-tools/container/)
+ COMPREPLY=( $(compgen -W "${commands}" -- ${cur}) )
+ return 0
+ ;;
+ esac
+
+ compopt -o filenames
+ COMPREPLY=( $(compgen -f -- $cur) )
+ return 0
+}
+
+complete -F _container container cnt
diff --git a/share/doc/examples/cairon-backports.cfg b/share/doc/examples/cairon-backports.cfg
index 713d902..eed9fd6 100644
--- a/share/doc/examples/cairon-backports.cfg
+++ b/share/doc/examples/cairon-backports.cfg
@@ -14,8 +14,8 @@ container-tools cnt-debconf/architecture select auto
container-tools cnt-debconf/archives multiselect cairon-security, cairon-updates, cairon-extras, cairon-backports, cairon-backports-extras
#container-tools cnt-debconf/parent-archives multiselect
-container-tools cnt-debconf/mirror string http://cdn.archive.progress-linux.org/packages
-container-tools cnt-debconf/mirror-security string http://cdn.archive.progress-linux.org/packages
+container-tools cnt-debconf/mirror string https://cdn.archive.progress-linux.org/packages
+container-tools cnt-debconf/mirror-security string https://cdn.archive.progress-linux.org/packages
container-tools cnt-debconf/parent-mirror string http://ftp.debian.org/debian
container-tools cnt-debconf/parent-mirror-security string http://security.debian.org
diff --git a/share/man/container-limit.1.txt b/share/man/container-limit.1.txt
index d7a060f..8538fe3 100644
--- a/share/man/container-limit.1.txt
+++ b/share/man/container-limit.1.txt
@@ -14,8 +14,8 @@
// 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-STOP(1)
-=================
+CONTAINER-LIMIT(1)
+==================
:doctype: manpage
:man manual: Open Infrastructure
:man source: container-tools
@@ -24,7 +24,7 @@ CONTAINER-STOP(1)
NAME
----
-container-stop - Limit ressources of a container
+container-limit - Limit ressources of a container
SYNOPSIS
diff --git a/share/man/container-list.1.txt b/share/man/container-list.1.txt
index 4d8bc72..5474da4 100644
--- a/share/man/container-list.1.txt
+++ b/share/man/container-list.1.txt
@@ -47,6 +47,12 @@ The following container options are available:
*-f, --format='FORMAT'*::
Use format to list container. Currently available formats are 'short' or 'full' (default).
+*-h, --host='HOSTNAME'*::
+ List only container that are enabled for automatic start on the specified hostname. Defaults to list containers of the local system only. Using 'all' shows all container regardless of any automatic start configuration.
+
+*-h, --other*::
+ List only container that are not enable for automatic start on the current system.
+
*-s, --started*::
List only started container.
diff --git a/share/man/container-tools.7.txt b/share/man/container-tools.7.txt
index 0e3e44d..95d09c8 100644
--- a/share/man/container-tools.7.txt
+++ b/share/man/container-tools.7.txt
@@ -38,7 +38,10 @@ container-tools provides the system integration for managing containers using sy
DOWNLOAD
--------
- * https://github.com/open-infrastructure/container-tools
+ * 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
@@ -47,7 +50,7 @@ INSTALLATION
SOURCE
~~~~~~
- 1. sudo apt instal asciidoc git docbook-xml docbook-xsl libxml2-utils make xsltproc
+ 1. sudo apt install asciidoc git docbook-xml docbook-xsl libxml2-utils make xsltproc
2. git clone https://github.com/open-infrastructure/container-tools
3. cd container-tools && sudo make install
diff --git a/share/scripts/debconf b/share/scripts/debconf
index 4f29238..c08444a 100755
--- a/share/scripts/debconf
+++ b/share/scripts/debconf
@@ -227,11 +227,11 @@ Debootstrap ()
# FIXME: trim down, debootstrap variants?
case "${MODE}" in
debian)
- INCLUDE="--include=ifupdown,locales,libui-dialog-perl,dialog,isc-dhcp-client,netbase,net-tools,iproute,wget,dbus"
+ INCLUDE="--include=ifupdown,locales,libui-dialog-perl,dialog,isc-dhcp-client,netbase,net-tools,iproute,wget,dbus,systemd-sysv"
;;
progress-linux)
- INCLUDE="--include=apt-utils,ifupdown,locales-all,libui-dialog-perl,dialog,isc-dhcp-client,netbase,net-tools,iproute,openssh-server,wget,dbus,libpam-systemd"
+ INCLUDE="--include=apt-transport-https,ca-certificates,apt-utils,ifupdown,locales-all,libui-dialog-perl,dialog,isc-dhcp-client,netbase,net-tools,iproute,openssh-server,wget,dbus,libpam-systemd,systemd-sysv"
;;
esac
diff --git a/share/scripts/debconf.d/0003-debconf b/share/scripts/debconf.d/0003-debconf
index baf6879..05c9eb5 100755
--- a/share/scripts/debconf.d/0003-debconf
+++ b/share/scripts/debconf.d/0003-debconf
@@ -303,7 +303,7 @@ Mirror ()
;;
progress-linux)
- db_set cnt-debconf/mirror http://cdn.archive.progress-linux.org/packages
+ db_set cnt-debconf/mirror https://cdn.archive.progress-linux.org/packages
db_fset cnt-debconf/mirror seen false
;;
esac
@@ -323,7 +323,7 @@ Mirror ()
;;
progress-linux)
- MIRROR="http://cdn.archive.progress-linux.org/packages"
+ MIRROR="https://cdn.archive.progress-linux.org/packages"
;;
esac
fi
diff --git a/share/systemd/container-auto.service b/share/systemd/container-auto.service
index e9addd7..b3384df 100644
--- a/share/systemd/container-auto.service
+++ b/share/systemd/container-auto.service
@@ -1,5 +1,6 @@
[Unit]
Description=container-tools automatic start
+Documentation=man:container-auto
After=network.target
[Service]
diff --git a/share/systemd/container@.service b/share/systemd/container@.service
index 0bd6766..539139e 100644
--- a/share/systemd/container@.service
+++ b/share/systemd/container@.service
@@ -1,5 +1,6 @@
[Unit]
Description="Container: %i"
+Documentation=man:container-tools
[Service]
Type=simple