summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2018-02-18 15:12:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2018-02-18 15:12:33 +0000
commitb609b560db2c50b53a7243e257b0692dd612ad06 (patch)
tree140ac1a219edd21244fc1f2d5989342aa7711f0c
parentAdding upstream version 20180118. (diff)
downloadopen-infrastructure-compute-tools-b609b560db2c50b53a7243e257b0692dd612ad06.tar.xz
open-infrastructure-compute-tools-b609b560db2c50b53a7243e257b0692dd612ad06.zip
Adding upstream version 20180218.upstream/20180218
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rw-r--r--CHANGELOG.txt13
-rw-r--r--Makefile2
-rw-r--r--VERSION.txt2
-rwxr-xr-xbin/container2
-rwxr-xr-xbin/container-nsenter2
-rwxr-xr-xbin/container-shell2
-rwxr-xr-xlib/container/auto2
-rwxr-xr-xlib/container/console2
-rwxr-xr-xlib/container/create2
-rwxr-xr-xlib/container/enter2
-rwxr-xr-xlib/container/key2
-rwxr-xr-xlib/container/limit2
-rwxr-xr-xlib/container/list2
-rwxr-xr-xlib/container/move2
-rwxr-xr-xlib/container/remove24
-rwxr-xr-xlib/container/restart2
-rwxr-xr-xlib/container/start2
-rwxr-xr-xlib/container/stop2
-rwxr-xr-xlib/container/top2
-rwxr-xr-xlib/container/version2
-rw-r--r--share/bash-completion/container2
-rwxr-xr-xshare/doc/asciicast/introduction.sh2
-rwxr-xr-xshare/hooks/pre-create.git-pull.sh35
-rw-r--r--share/man/Makefile2
-rw-r--r--share/man/container-auto.1.txt2
-rw-r--r--share/man/container-console.1.txt2
-rw-r--r--share/man/container-create-curl.1.txt2
-rw-r--r--share/man/container-create-debconf.1.txt2
-rw-r--r--share/man/container-create-debootstrap.1.txt2
-rw-r--r--share/man/container-create.1.txt2
-rw-r--r--share/man/container-enter.1.txt2
-rw-r--r--share/man/container-key.1.txt2
-rw-r--r--share/man/container-limit.1.txt2
-rw-r--r--share/man/container-list.1.txt2
-rw-r--r--share/man/container-move.1.txt2
-rw-r--r--share/man/container-remove.1.txt8
-rw-r--r--share/man/container-restart.1.txt2
-rw-r--r--share/man/container-shell.1.txt2
-rw-r--r--share/man/container-start.1.txt2
-rw-r--r--share/man/container-stop.1.txt2
-rw-r--r--share/man/container-tools.7.txt2
-rw-r--r--share/man/container-top.1.txt2
-rw-r--r--share/man/container-version.1.txt2
-rw-r--r--share/man/container.1.txt2
-rwxr-xr-xshare/scripts/curl2
-rwxr-xr-xshare/scripts/curl.d/0001-debconf2
-rwxr-xr-xshare/scripts/debconf2
-rwxr-xr-xshare/scripts/debconf.d/0001-preseed-file17
-rwxr-xr-xshare/scripts/debconf.d/0002-preseed-debconf2
-rwxr-xr-xshare/scripts/debconf.d/0003-debconf10
-rwxr-xr-xshare/scripts/debootstrap2
51 files changed, 124 insertions, 73 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 0f6622e..d6ca7b6 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,3 +1,16 @@
+2018-02-18 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+
+ * Releasing version 20180218.
+
+ [ Daniel Baumann ]
+ * Updating year in copyright information for 2018.
+ * Adding container remove --allow-stop option to override abort of running containers and stop them prior removal.
+ * Making pre-create.git-pull.sh hook to be aware of multiple subdirectories below /etc/container-tools/debconf for multi-site container debconf files.
+ * Making container debconf create script aware of multiple subdirectories below /etc/container-tools/debconf when showing the list of preseed files to the user.
+ * Making container debconf create script aware of multiple subdirectories below /etc/container-tools/debconf for automatically selecting an existing and matching debconf file.
+ * Always sorting preseed files starting with a capital letter first in debconf container create script, independent of systems locale.
+ * Adding support for Debian testing/buster in debconf container create script.
+
2018-01-18 Daniel Baumann <daniel.baumann@open-infrastructure.net>
* Releasing version 20180118.
diff --git a/Makefile b/Makefile
index 0064737..2834779 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
# Makefile
# container-tools - Manage systemd-nspawn containers
-# Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/VERSION.txt b/VERSION.txt
index 9d0d05b..66631f9 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -1 +1 @@
-20180119
+20180218
diff --git a/bin/container b/bin/container
index 472df8c..9634d05 100755
--- a/bin/container
+++ b/bin/container
@@ -1,7 +1,7 @@
#!/bin/sh
# container-tools - Manage systemd-nspawn containers
-# Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/bin/container-nsenter b/bin/container-nsenter
index bfe5bdc..a12bb0d 100755
--- a/bin/container-nsenter
+++ b/bin/container-nsenter
@@ -1,7 +1,7 @@
#!/bin/sh
# container-tools - Manage systemd-nspawn containers
-# Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/bin/container-shell b/bin/container-shell
index 9849e72..2ca5cd3 100755
--- a/bin/container-shell
+++ b/bin/container-shell
@@ -1,7 +1,7 @@
#!/bin/sh
# container-tools - Manage systemd-nspawn containers
-# Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/lib/container/auto b/lib/container/auto
index 9bdd484..8477915 100755
--- a/lib/container/auto
+++ b/lib/container/auto
@@ -1,7 +1,7 @@
#!/bin/sh
# container-tools - Manage systemd-nspawn containers
-# Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/lib/container/console b/lib/container/console
index 9ec3db8..dfc9b5c 100755
--- a/lib/container/console
+++ b/lib/container/console
@@ -1,7 +1,7 @@
#!/bin/sh
# container-tools - Manage systemd-nspawn containers
-# Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/lib/container/create b/lib/container/create
index 6f9a240..5878e7e 100755
--- a/lib/container/create
+++ b/lib/container/create
@@ -1,7 +1,7 @@
#!/bin/sh
# container-tools - Manage systemd-nspawn containers
-# Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/lib/container/enter b/lib/container/enter
index e52a8e1..faf5d35 100755
--- a/lib/container/enter
+++ b/lib/container/enter
@@ -1,7 +1,7 @@
#!/bin/sh
# container-tools - Manage systemd-nspawn containers
-# Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/lib/container/key b/lib/container/key
index 8a73ae1..3f0f57b 100755
--- a/lib/container/key
+++ b/lib/container/key
@@ -1,7 +1,7 @@
#!/bin/sh
# container-tools - Manage systemd-nspawn containers
-# Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/lib/container/limit b/lib/container/limit
index 71d874f..f2d6bfa 100755
--- a/lib/container/limit
+++ b/lib/container/limit
@@ -1,7 +1,7 @@
#!/bin/sh
# container-tools - Manage systemd-nspawn containers
-# Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/lib/container/list b/lib/container/list
index 00eebd1..6fa9eed 100755
--- a/lib/container/list
+++ b/lib/container/list
@@ -1,7 +1,7 @@
#!/bin/sh
# container-tools - Manage systemd-nspawn containers
-# Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/lib/container/move b/lib/container/move
index af17b35..e533b0e 100755
--- a/lib/container/move
+++ b/lib/container/move
@@ -1,7 +1,7 @@
#!/bin/sh
# container-tools - Manage systemd-nspawn containers
-# Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/lib/container/remove b/lib/container/remove
index 6310597..e8dd653 100755
--- a/lib/container/remove
+++ b/lib/container/remove
@@ -1,7 +1,7 @@
#!/bin/sh
# container-tools - Manage systemd-nspawn containers
-# Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -28,7 +28,7 @@ MACHINES="/var/lib/machines"
Parameters ()
{
- GETOPT_LONGOPTIONS="name:,force,verbose,"
+ GETOPT_LONGOPTIONS="name:,allow-stop,force,verbose,"
GETOPT_OPTIONS="n:,f,v,"
PARAMETERS="$(getopt --longoptions ${GETOPT_LONGOPTIONS} --name=${COMMAND} --options ${GETOPT_OPTIONS} --shell sh -- ${@})"
@@ -49,6 +49,11 @@ Parameters ()
shift 2
;;
+ --allow-stop)
+ ALLOW_STOP="true"
+ shift 1
+ ;;
+
-f|--force)
FORCE="true"
shift 1
@@ -74,7 +79,7 @@ Parameters ()
Usage ()
{
- echo "Usage: container ${COMMAND} -n|--name NAME [-f|--force] [-v|--verbose]" >&2
+ echo "Usage: container ${COMMAND} -n|--name NAME [--allow-stop] [-f|--force] [-v|--verbose]" >&2
exit 1
}
@@ -116,8 +121,17 @@ STATE="$(machinectl show ${NAME} 2>&1 | awk -F= '/^State=/ { print $2 }')"
case "${STATE}" in
running)
- echo "'${NAME}': container is started" >&2
- exit 1
+ case "${ALLOW_STOP}" in
+ true)
+ echo "'${NAME}': container is started, stopping it now" >&2
+ container stop -n ${NAME}
+ ;;
+
+ *)
+ echo "'${NAME}': container is started" >&2
+ exit 1
+ ;;
+ esac
;;
esac
diff --git a/lib/container/restart b/lib/container/restart
index db7811e..a507cc0 100755
--- a/lib/container/restart
+++ b/lib/container/restart
@@ -1,7 +1,7 @@
#!/bin/sh
# container-tools - Manage systemd-nspawn containers
-# Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/lib/container/start b/lib/container/start
index ca88af2..e4b2ee6 100755
--- a/lib/container/start
+++ b/lib/container/start
@@ -1,7 +1,7 @@
#!/bin/sh
# container-tools - Manage systemd-nspawn containers
-# Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/lib/container/stop b/lib/container/stop
index f6618d5..5099005 100755
--- a/lib/container/stop
+++ b/lib/container/stop
@@ -1,7 +1,7 @@
#!/bin/sh
# container-tools - Manage systemd-nspawn containers
-# Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/lib/container/top b/lib/container/top
index 47725ff..22a224a 100755
--- a/lib/container/top
+++ b/lib/container/top
@@ -1,7 +1,7 @@
#!/bin/sh
# container-tools - Manage systemd-nspawn containers
-# Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/lib/container/version b/lib/container/version
index 9f0afd1..fe42216 100755
--- a/lib/container/version
+++ b/lib/container/version
@@ -1,7 +1,7 @@
#!/bin/sh
# container-tools - Manage systemd-nspawn containers
-# Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/share/bash-completion/container b/share/bash-completion/container
index 6233e17..0a9af1a 100644
--- a/share/bash-completion/container
+++ b/share/bash-completion/container
@@ -2,7 +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>
+# Copyright (C) 2016-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/share/doc/asciicast/introduction.sh b/share/doc/asciicast/introduction.sh
index 97649fa..2a1ab0b 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-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/share/hooks/pre-create.git-pull.sh b/share/hooks/pre-create.git-pull.sh
index 3719d43..cee7d8c 100755
--- a/share/hooks/pre-create.git-pull.sh
+++ b/share/hooks/pre-create.git-pull.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# container-tools - Manage systemd-nspawn containers
-# Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -20,23 +20,28 @@
set -e
-if [ -e /etc/container-tools/debconf/.git ] && [ -e /usr/bin/git ]
-then
- echo "Updating /etc/container-tools/debconf..."
+DIRECTORIES="/etc/container-tools/debconf /etc/container-tools/debconf/*/"
- if [ -e /etc/default/container-tools ]
+for DIRECTORY in ${DIRECTORIES}
+do
+ if [ -e "${DIRECTORY}/.git" ] && [ -e /usr/bin/git ]
then
- . /etc/default/container-tools
- fi
+ echo "Updating ${DIRECTORY}..."
+
+ if [ -e /etc/default/container-tools ]
+ then
+ . /etc/default/container-tools
+ fi
- DEBCONF_ID="${DEBCONF_ID:-HEAD}"
+ DEBCONF_ID="${DEBCONF_ID:-HEAD}"
- cd /etc/container-tools/debconf
+ cd "${DIRECTORY}"
- git clean -dfx
- git checkout -f ${DEBCONF_ID}
- git pull --rebase
- echo
+ git clean -dfx
+ git checkout -f ${DEBCONF_ID}
+ git pull --rebase
+ echo
- cd "${OLDPWD}"
-fi
+ cd "${OLDPWD}"
+ fi
+done
diff --git a/share/man/Makefile b/share/man/Makefile
index 2f482be..a069734 100644
--- a/share/man/Makefile
+++ b/share/man/Makefile
@@ -1,7 +1,7 @@
# Makefile
# container-tools - Manage systemd-nspawn containers
-# Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/share/man/container-auto.1.txt b/share/man/container-auto.1.txt
index 79603dd..43713be 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-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+// Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
//
// SPDX-License-Identifier: GPL-3.0+
//
diff --git a/share/man/container-console.1.txt b/share/man/container-console.1.txt
index 390c3a6..f327097 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-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+// Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
//
// SPDX-License-Identifier: GPL-3.0+
//
diff --git a/share/man/container-create-curl.1.txt b/share/man/container-create-curl.1.txt
index 7ec8ca2..543a261 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-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+// Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
//
// SPDX-License-Identifier: GPL-3.0+
//
diff --git a/share/man/container-create-debconf.1.txt b/share/man/container-create-debconf.1.txt
index b487adc..ce77c53 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-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+// Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
//
// SPDX-License-Identifier: GPL-3.0+
//
diff --git a/share/man/container-create-debootstrap.1.txt b/share/man/container-create-debootstrap.1.txt
index 5241dda..56d6f65 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-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+// Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
//
// SPDX-License-Identifier: GPL-3.0+
//
diff --git a/share/man/container-create.1.txt b/share/man/container-create.1.txt
index 2f41b58..6ffc867 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-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+// Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
//
// SPDX-License-Identifier: GPL-3.0+
//
diff --git a/share/man/container-enter.1.txt b/share/man/container-enter.1.txt
index 703628a..d200295 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-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+// Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
//
// SPDX-License-Identifier: GPL-3.0+
//
diff --git a/share/man/container-key.1.txt b/share/man/container-key.1.txt
index df9605f..0cd26b2 100644
--- a/share/man/container-key.1.txt
+++ b/share/man/container-key.1.txt
@@ -1,5 +1,5 @@
// container-tools - Manage systemd-nspawn containers
-// Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+// Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
//
// SPDX-License-Identifier: GPL-3.0+
//
diff --git a/share/man/container-limit.1.txt b/share/man/container-limit.1.txt
index 9a2c532..7af59e7 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-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+// Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
//
// SPDX-License-Identifier: GPL-3.0+
//
diff --git a/share/man/container-list.1.txt b/share/man/container-list.1.txt
index 48beae6..10f9ac3 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-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+// Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
//
// SPDX-License-Identifier: GPL-3.0+
//
diff --git a/share/man/container-move.1.txt b/share/man/container-move.1.txt
index 126b3c1..2f90433 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-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+// Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
//
// SPDX-License-Identifier: GPL-3.0+
//
diff --git a/share/man/container-remove.1.txt b/share/man/container-remove.1.txt
index 8dd6fdc..ab807f4 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-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+// Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
//
// SPDX-License-Identifier: GPL-3.0+
//
@@ -48,6 +48,9 @@ The following container options are available:
*-n, --name='NAME'*::
Specify container name.
+*--allow-stop*::
+ Stop container prior removal.
+
*-f, --force*::
Do not prompt before removal.
@@ -63,6 +66,9 @@ EXAMPLES
*Remove example.net container from the system without prompt:*::
sudo container remove -n example.net -f
+*Remove a running container from the system, without prompt:*::
+ sudo container remove -n example.net -f --allow-stop
+
SEE ALSO
--------
diff --git a/share/man/container-restart.1.txt b/share/man/container-restart.1.txt
index 0239691..922bbe4 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-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+// Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
//
// SPDX-License-Identifier: GPL-3.0+
//
diff --git a/share/man/container-shell.1.txt b/share/man/container-shell.1.txt
index 02705f3..d36c93d 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-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+// Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
//
// SPDX-License-Identifier: GPL-3.0+
//
diff --git a/share/man/container-start.1.txt b/share/man/container-start.1.txt
index 88ee984..8aa7d28 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-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+// Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
//
// SPDX-License-Identifier: GPL-3.0+
//
diff --git a/share/man/container-stop.1.txt b/share/man/container-stop.1.txt
index 85eb46b..22589be 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-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+// Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
//
// SPDX-License-Identifier: GPL-3.0+
//
diff --git a/share/man/container-tools.7.txt b/share/man/container-tools.7.txt
index 5e7a53b..1d17dec 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-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+// Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
//
// SPDX-License-Identifier: GPL-3.0+
//
diff --git a/share/man/container-top.1.txt b/share/man/container-top.1.txt
index 4012ccb..93e83e8 100644
--- a/share/man/container-top.1.txt
+++ b/share/man/container-top.1.txt
@@ -1,5 +1,5 @@
// container-tools - Manage systemd-nspawn containers
-// Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+// Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
//
// SPDX-License-Identifier: GPL-3.0+
//
diff --git a/share/man/container-version.1.txt b/share/man/container-version.1.txt
index e1e4d2d..170e3c4 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-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+// Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
//
// SPDX-License-Identifier: GPL-3.0+
//
diff --git a/share/man/container.1.txt b/share/man/container.1.txt
index 5029d25..5161154 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-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+// Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
//
// SPDX-License-Identifier: GPL-3.0+
//
diff --git a/share/scripts/curl b/share/scripts/curl
index 1353bce..72bdec3 100755
--- a/share/scripts/curl
+++ b/share/scripts/curl
@@ -1,7 +1,7 @@
#!/bin/sh
# container-tools - Manage systemd-nspawn containers
-# Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/share/scripts/curl.d/0001-debconf b/share/scripts/curl.d/0001-debconf
index 598c482..1f31b63 100755
--- a/share/scripts/curl.d/0001-debconf
+++ b/share/scripts/curl.d/0001-debconf
@@ -1,7 +1,7 @@
#!/bin/sh
# container-tools - Manage systemd-nspawn containers
-# Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/share/scripts/debconf b/share/scripts/debconf
index ee23ebc..77a974a 100755
--- a/share/scripts/debconf
+++ b/share/scripts/debconf
@@ -1,7 +1,7 @@
#!/bin/sh
# container-tools - Manage systemd-nspawn containers
-# Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/share/scripts/debconf.d/0001-preseed-file b/share/scripts/debconf.d/0001-preseed-file
index 5b646c4..fab7d8d 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-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -38,18 +38,27 @@ then
# available on the system matching the container name
db_set cnt-debconf/preseed-file "${CONFIG}/${NAME}.cfg"
db_fset cnt-debconf/preseed-file seen true
+elif [ "$(ls ${CONFIG}/*/${NAME}.cfg 2>/dev/null | wc -l)" -eq 1 ]
+then
+ # user did not specify a pressed file, but there is 1 (and only 1)
+ # matching in a sub-directory of /etc/container-tools/debconf
+
+ FILE="$(ls ${CONFIG}/*/${NAME}.cfg)"
+
+ db_set cnt-debconf/preseed-file "${FILE}"
+ db_fset cnt-debconf/preseed-file seen true
elif [ -e "${CONFIG}/default.cfg" ]
then
# user did not specify a pressed file, but there is a default one
db_set cnt-debconf/preseed-file "${CONFIG}/default.cfg"
db_fset cnt-debconf/preseed-file seen true
-elif ls "${CONFIG}"/*.cfg > /dev/null 2>&1
+elif ls "${CONFIG}"/*.cfg > /dev/null 2>&1 || ls "${CONFIG}"/*/*.cfg > /dev/null 2>&1
then
# user has not specified preseed files through commandline option,
# showing debconf selection dialog for global preseed file.
- FILES="$(cd ${CONFIG} && find . -type f -name '*.cfg' -printf '%P\n' | sort)"
- PRESEED_FILES="$(for FILE in ${FILES}; do echo -n "$(basename ${FILE} .cfg), "; done | sed -e 's|, $||')"
+ FILES="$(cd ${CONFIG} && find . -type f -name '*.cfg' -printf '%P\n' | LC_ALL=C sort)"
+ PRESEED_FILES="$(for FILE in ${FILES}; do echo -n "$(echo ${FILE} | sed -e 's|.cfg$||'), "; done | sed -e 's|, $||')"
if [ -n "${PRESEED_FILES}" ]
then
diff --git a/share/scripts/debconf.d/0002-preseed-debconf b/share/scripts/debconf.d/0002-preseed-debconf
index 3a96ad4..ac101ad 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-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
diff --git a/share/scripts/debconf.d/0003-debconf b/share/scripts/debconf.d/0003-debconf
index 4395abc..cb9ae2a 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-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#
@@ -54,8 +54,8 @@ Distribution ()
then
case "${MODE}" in
debian)
- db_subst cnt-debconf/distribution CHOICES "Debian GNU/Linux 9 \"stretch\", Debian GNU/Linux unstable/sid"
- db_subst cnt-debconf/distribution CHOICES_C "stretch, sid"
+ db_subst cnt-debconf/distribution CHOICES "Debian GNU/Linux 9 \"stretch\", Debian GNU/Linux testing/buster, Debian GNU/Linux unstable/sid"
+ db_subst cnt-debconf/distribution CHOICES_C "stretch, buster, sid"
db_set cnt-debconf/distribution stretch
db_fset cnt-debconf/distribution seen false
@@ -212,6 +212,10 @@ Archives ()
db_set cnt-debconf/archives ""
;;
+ buster)
+ db_set cnt-debconf/archives "${DISTRIBUTION}-security, ${DISTRIBUTION}-updates"
+ ;;
+
*)
#db_set cnt-debconf/archives "${DISTRIBUTION}-security, ${DISTRIBUTION}-updates, ${DISTRIBUTION}-backports"
db_set cnt-debconf/archives "${DISTRIBUTION}-security, ${DISTRIBUTION}-updates"
diff --git a/share/scripts/debootstrap b/share/scripts/debootstrap
index e34613c..12f1b95 100755
--- a/share/scripts/debootstrap
+++ b/share/scripts/debootstrap
@@ -1,7 +1,7 @@
#!/bin/sh
# container-tools - Manage systemd-nspawn containers
-# Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2018 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# SPDX-License-Identifier: GPL-3.0+
#