diff options
Diffstat (limited to '')
54 files changed, 158 insertions, 14 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f5d5e73..0f6622e 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,15 @@ +2018-01-18 Daniel Baumann <daniel.baumann@open-infrastructure.net> + + * Releasing version 20180118. + + [ Daniel Baumann ] + * Adding SPDX License Identifiers. + * Automatically take matching preseeding files from /etc/container-tools/debconf. + * Automatically take default preseeding file from /etc/container-tools/debconf if available. + * Adding note about vsyscall boot parameter in host-setup documentation. + * Running host commands as last thing in debconf container create script in order to make it possible to change config files dynamically. + * Adding message when creating bind mount directories in container start command. + 2017-11-01 Daniel Baumann <daniel.baumann@open-infrastructure.net> * Releasing version 20171101. @@ -3,6 +3,8 @@ # container-tools - Manage systemd-nspawn containers # Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> # +# SPDX-License-Identifier: GPL-3.0+ +# # 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 diff --git a/VERSION.txt b/VERSION.txt index 0c5aadd..9d0d05b 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -20171101 +20180119 diff --git a/bin/container b/bin/container index 1b57193..472df8c 100755 --- a/bin/container +++ b/bin/container @@ -3,6 +3,8 @@ # container-tools - Manage systemd-nspawn containers # Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> # +# SPDX-License-Identifier: GPL-3.0+ +# # 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 diff --git a/bin/container-nsenter b/bin/container-nsenter index bf47331..bfe5bdc 100755 --- a/bin/container-nsenter +++ b/bin/container-nsenter @@ -3,6 +3,8 @@ # container-tools - Manage systemd-nspawn containers # Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> # +# SPDX-License-Identifier: GPL-3.0+ +# # 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 diff --git a/bin/container-shell b/bin/container-shell index 4903465..9849e72 100755 --- a/bin/container-shell +++ b/bin/container-shell @@ -3,6 +3,8 @@ # container-tools - Manage systemd-nspawn containers # Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> # +# SPDX-License-Identifier: GPL-3.0+ +# # 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 diff --git a/lib/container/auto b/lib/container/auto index cbacad2..9bdd484 100755 --- a/lib/container/auto +++ b/lib/container/auto @@ -3,6 +3,8 @@ # container-tools - Manage systemd-nspawn containers # Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> # +# SPDX-License-Identifier: GPL-3.0+ +# # 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 diff --git a/lib/container/console b/lib/container/console index 13bceb9..9ec3db8 100755 --- a/lib/container/console +++ b/lib/container/console @@ -3,6 +3,8 @@ # container-tools - Manage systemd-nspawn containers # Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> # +# SPDX-License-Identifier: GPL-3.0+ +# # 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 diff --git a/lib/container/create b/lib/container/create index 570492f..6f9a240 100755 --- a/lib/container/create +++ b/lib/container/create @@ -3,6 +3,8 @@ # container-tools - Manage systemd-nspawn containers # Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> # +# SPDX-License-Identifier: GPL-3.0+ +# # 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 diff --git a/lib/container/enter b/lib/container/enter index dc2dd09..e52a8e1 100755 --- a/lib/container/enter +++ b/lib/container/enter @@ -3,6 +3,8 @@ # container-tools - Manage systemd-nspawn containers # Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> # +# SPDX-License-Identifier: GPL-3.0+ +# # 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 diff --git a/lib/container/key b/lib/container/key index e97d8e1..8a73ae1 100755 --- a/lib/container/key +++ b/lib/container/key @@ -3,6 +3,8 @@ # container-tools - Manage systemd-nspawn containers # Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> # +# SPDX-License-Identifier: GPL-3.0+ +# # 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 diff --git a/lib/container/limit b/lib/container/limit index 05bffdc..71d874f 100755 --- a/lib/container/limit +++ b/lib/container/limit @@ -3,6 +3,8 @@ # container-tools - Manage systemd-nspawn containers # Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> # +# SPDX-License-Identifier: GPL-3.0+ +# # 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 diff --git a/lib/container/list b/lib/container/list index 3e1f981..00eebd1 100755 --- a/lib/container/list +++ b/lib/container/list @@ -3,6 +3,8 @@ # container-tools - Manage systemd-nspawn containers # Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> # +# SPDX-License-Identifier: GPL-3.0+ +# # 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 diff --git a/lib/container/move b/lib/container/move index 3cc2e40..af17b35 100755 --- a/lib/container/move +++ b/lib/container/move @@ -3,6 +3,8 @@ # container-tools - Manage systemd-nspawn containers # Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> # +# SPDX-License-Identifier: GPL-3.0+ +# # 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 diff --git a/lib/container/remove b/lib/container/remove index c9a45a6..6310597 100755 --- a/lib/container/remove +++ b/lib/container/remove @@ -3,6 +3,8 @@ # container-tools - Manage systemd-nspawn containers # Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> # +# SPDX-License-Identifier: GPL-3.0+ +# # 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 diff --git a/lib/container/restart b/lib/container/restart index a5c2b93..db7811e 100755 --- a/lib/container/restart +++ b/lib/container/restart @@ -3,6 +3,8 @@ # container-tools - Manage systemd-nspawn containers # Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> # +# SPDX-License-Identifier: GPL-3.0+ +# # 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 diff --git a/lib/container/start b/lib/container/start index 566b4b0..ca88af2 100755 --- a/lib/container/start +++ b/lib/container/start @@ -3,6 +3,8 @@ # container-tools - Manage systemd-nspawn containers # Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> # +# SPDX-License-Identifier: GPL-3.0+ +# # 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 @@ -210,7 +212,11 @@ then do DIRECTORY="$(echo ${BIND} | awk -F: '{ print $1 }')" - mkdir -p "${DIRECTORY}" + if [ ! -e "${DIRECTORY}" ] + then + echo "'${DIRECTORY}': creating non-existing directory for bind mounting" + mkdir -p "${DIRECTORY}" + fi done BIND="" @@ -231,7 +237,11 @@ then do DIRECTORY="$(echo ${BIND_RO} | awk -F: '{ print $1 }')" - mkdir -p "${DIRECTORY}" + if [ ! -e "${DIRECTORY}" ] + then + echo "'${DIRECTORY}': creating non-existing directory for bind-ro mounting" + mkdir -p "${DIRECTORY}" + fi done BIND_RO="" diff --git a/lib/container/status b/lib/container/status index 7429c78..9c5ab20 100755 --- a/lib/container/status +++ b/lib/container/status @@ -3,6 +3,8 @@ # container-tools - Manage systemd-nspawn containers # Copyright (C) 2016 Simon Spöehel <simon.spoehel@open-infrastructure.net> # +# SPDX-License-Identifier: GPL-3.0+ +# # 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 diff --git a/lib/container/stop b/lib/container/stop index 6b1c986..f6618d5 100755 --- a/lib/container/stop +++ b/lib/container/stop @@ -3,6 +3,8 @@ # container-tools - Manage systemd-nspawn containers # Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> # +# SPDX-License-Identifier: GPL-3.0+ +# # 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 diff --git a/lib/container/top b/lib/container/top index 0ff1834..47725ff 100755 --- a/lib/container/top +++ b/lib/container/top @@ -3,6 +3,8 @@ # container-tools - Manage systemd-nspawn containers # Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> # +# SPDX-License-Identifier: GPL-3.0+ +# # 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 diff --git a/lib/container/version b/lib/container/version index 89790e9..9f0afd1 100755 --- a/lib/container/version +++ b/lib/container/version @@ -3,6 +3,8 @@ # container-tools - Manage systemd-nspawn containers # Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> # +# SPDX-License-Identifier: GPL-3.0+ +# # 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 diff --git a/share/bash-completion/container b/share/bash-completion/container index e2fa4d3..6233e17 100644 --- a/share/bash-completion/container +++ b/share/bash-completion/container @@ -4,6 +4,8 @@ # Copyright (C) 2016 Andreas Kreuzer <andreas.kreuzer@open-infrastructure.net> # Copyright (C) 2016-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> # +# SPDX-License-Identifier: GPL-3.0+ +# # 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 diff --git a/share/doc/HOST-SETUP.txt b/share/doc/HOST-SETUP.txt index ca043c5..74b7333 100644 --- a/share/doc/HOST-SETUP.txt +++ b/share/doc/HOST-SETUP.txt @@ -26,6 +26,15 @@ In order to enable the swap controller the following boot parameter needs to be swapaccount=1 +2.3 vsyscall +~~~~~~~~~~~~ + +In order to be able to execute binaries linked to older libc versions +(<= wheezy) newer linux versions (>= buster), add the following boot parameter +(see #881813 for more information): + + vsyscall=emulate + 3. Networking ~~~~~~~~~~~~~ diff --git a/share/doc/asciicast/introduction.sh b/share/doc/asciicast/introduction.sh index 5341075..97649fa 100755 --- a/share/doc/asciicast/introduction.sh +++ b/share/doc/asciicast/introduction.sh @@ -3,6 +3,8 @@ # container-tools - Manage systemd-nspawn containers # Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> # +# SPDX-License-Identifier: GPL-3.0+ +# # 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 diff --git a/share/hooks/pre-create.git-pull.sh b/share/hooks/pre-create.git-pull.sh index cb1d09c..3719d43 100755 --- a/share/hooks/pre-create.git-pull.sh +++ b/share/hooks/pre-create.git-pull.sh @@ -3,6 +3,8 @@ # container-tools - Manage systemd-nspawn containers # Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> # +# SPDX-License-Identifier: GPL-3.0+ +# # 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 diff --git a/share/man/Makefile b/share/man/Makefile index 5141ced..2f482be 100644 --- a/share/man/Makefile +++ b/share/man/Makefile @@ -3,6 +3,8 @@ # container-tools - Manage systemd-nspawn containers # Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> # +# SPDX-License-Identifier: GPL-3.0+ +# # 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 diff --git a/share/man/container-auto.1.txt b/share/man/container-auto.1.txt index 5aaf0d1..79603dd 100644 --- a/share/man/container-auto.1.txt +++ b/share/man/container-auto.1.txt @@ -1,6 +1,8 @@ // container-tools - Manage systemd-nspawn containers // Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> // +// SPDX-License-Identifier: GPL-3.0+ +// // 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 diff --git a/share/man/container-console.1.txt b/share/man/container-console.1.txt index add4fc0..390c3a6 100644 --- a/share/man/container-console.1.txt +++ b/share/man/container-console.1.txt @@ -1,6 +1,8 @@ // container-tools - Manage systemd-nspawn containers // Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> // +// SPDX-License-Identifier: GPL-3.0+ +// // 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 diff --git a/share/man/container-create-curl.1.txt b/share/man/container-create-curl.1.txt index 8e267ce..7ec8ca2 100644 --- a/share/man/container-create-curl.1.txt +++ b/share/man/container-create-curl.1.txt @@ -1,6 +1,8 @@ // container-tools - Manage systemd-nspawn containers // Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> // +// SPDX-License-Identifier: GPL-3.0+ +// // 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 diff --git a/share/man/container-create-debconf.1.txt b/share/man/container-create-debconf.1.txt index 2b5c37c..b487adc 100644 --- a/share/man/container-create-debconf.1.txt +++ b/share/man/container-create-debconf.1.txt @@ -1,6 +1,8 @@ // container-tools - Manage systemd-nspawn containers // Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> // +// SPDX-License-Identifier: GPL-3.0+ +// // 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 diff --git a/share/man/container-create-debootstrap.1.txt b/share/man/container-create-debootstrap.1.txt index 5b3b815..5241dda 100644 --- a/share/man/container-create-debootstrap.1.txt +++ b/share/man/container-create-debootstrap.1.txt @@ -1,6 +1,8 @@ // container-tools - Manage systemd-nspawn containers // Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> // +// SPDX-License-Identifier: GPL-3.0+ +// // 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 diff --git a/share/man/container-create.1.txt b/share/man/container-create.1.txt index 22f9c8e..2f41b58 100644 --- a/share/man/container-create.1.txt +++ b/share/man/container-create.1.txt @@ -1,6 +1,8 @@ // container-tools - Manage systemd-nspawn containers // Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> // +// SPDX-License-Identifier: GPL-3.0+ +// // 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 diff --git a/share/man/container-enter.1.txt b/share/man/container-enter.1.txt index 43d1721..703628a 100644 --- a/share/man/container-enter.1.txt +++ b/share/man/container-enter.1.txt @@ -1,6 +1,8 @@ // container-tools - Manage systemd-nspawn containers // Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> // +// SPDX-License-Identifier: GPL-3.0+ +// // 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 diff --git a/share/man/container-key.1.txt b/share/man/container-key.1.txt index 070047b..df9605f 100644 --- a/share/man/container-key.1.txt +++ b/share/man/container-key.1.txt @@ -1,6 +1,8 @@ // container-tools - Manage systemd-nspawn containers // Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> // +// SPDX-License-Identifier: GPL-3.0+ +// // 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 diff --git a/share/man/container-limit.1.txt b/share/man/container-limit.1.txt index 534bd76..9a2c532 100644 --- a/share/man/container-limit.1.txt +++ b/share/man/container-limit.1.txt @@ -1,6 +1,8 @@ // container-tools - Manage systemd-nspawn containers // Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> // +// SPDX-License-Identifier: GPL-3.0+ +// // 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 diff --git a/share/man/container-list.1.txt b/share/man/container-list.1.txt index f629e33..48beae6 100644 --- a/share/man/container-list.1.txt +++ b/share/man/container-list.1.txt @@ -1,6 +1,8 @@ // container-tools - Manage systemd-nspawn containers // Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> // +// SPDX-License-Identifier: GPL-3.0+ +// // 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 diff --git a/share/man/container-move.1.txt b/share/man/container-move.1.txt index 0c682d3..126b3c1 100644 --- a/share/man/container-move.1.txt +++ b/share/man/container-move.1.txt @@ -1,6 +1,8 @@ // container-tools - Manage systemd-nspawn containers // Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> // +// SPDX-License-Identifier: GPL-3.0+ +// // 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 diff --git a/share/man/container-remove.1.txt b/share/man/container-remove.1.txt index 917311d..8dd6fdc 100644 --- a/share/man/container-remove.1.txt +++ b/share/man/container-remove.1.txt @@ -1,6 +1,8 @@ // container-tools - Manage systemd-nspawn containers // Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> // +// SPDX-License-Identifier: GPL-3.0+ +// // 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 diff --git a/share/man/container-restart.1.txt b/share/man/container-restart.1.txt index c2b2d39..0239691 100644 --- a/share/man/container-restart.1.txt +++ b/share/man/container-restart.1.txt @@ -1,6 +1,8 @@ // container-tools - Manage systemd-nspawn containers // Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> // +// SPDX-License-Identifier: GPL-3.0+ +// // 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 diff --git a/share/man/container-shell.1.txt b/share/man/container-shell.1.txt index 760e0c5..02705f3 100644 --- a/share/man/container-shell.1.txt +++ b/share/man/container-shell.1.txt @@ -1,6 +1,8 @@ // container-tools - Manage systemd-nspawn containers // Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> // +// SPDX-License-Identifier: GPL-3.0+ +// // 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 diff --git a/share/man/container-start.1.txt b/share/man/container-start.1.txt index 5210d08..88ee984 100644 --- a/share/man/container-start.1.txt +++ b/share/man/container-start.1.txt @@ -1,6 +1,8 @@ // container-tools - Manage systemd-nspawn containers // Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> // +// SPDX-License-Identifier: GPL-3.0+ +// // 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 diff --git a/share/man/container-status.1.txt b/share/man/container-status.1.txt index 8da969f..2cfd28d 100644 --- a/share/man/container-status.1.txt +++ b/share/man/container-status.1.txt @@ -1,6 +1,8 @@ // container-tools - Manage systemd-nspawn containers // Copyright (C) 2016 Simon Spöehel <simon.spoehel@open-infrastructure.net> // +// SPDX-License-Identifier: GPL-3.0+ +// // 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 diff --git a/share/man/container-stop.1.txt b/share/man/container-stop.1.txt index 95c67e4..85eb46b 100644 --- a/share/man/container-stop.1.txt +++ b/share/man/container-stop.1.txt @@ -1,6 +1,8 @@ // container-tools - Manage systemd-nspawn containers // Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> // +// SPDX-License-Identifier: GPL-3.0+ +// // 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 diff --git a/share/man/container-tools.7.txt b/share/man/container-tools.7.txt index 86266eb..5e7a53b 100644 --- a/share/man/container-tools.7.txt +++ b/share/man/container-tools.7.txt @@ -1,6 +1,8 @@ // container-tools - Manage systemd-nspawn containers // Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> // +// SPDX-License-Identifier: GPL-3.0+ +// // 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 diff --git a/share/man/container-top.1.txt b/share/man/container-top.1.txt index 5cc2a0a..4012ccb 100644 --- a/share/man/container-top.1.txt +++ b/share/man/container-top.1.txt @@ -1,6 +1,8 @@ // container-tools - Manage systemd-nspawn containers // Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> // +// SPDX-License-Identifier: GPL-3.0+ +// // 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 diff --git a/share/man/container-version.1.txt b/share/man/container-version.1.txt index d3a59f8..e1e4d2d 100644 --- a/share/man/container-version.1.txt +++ b/share/man/container-version.1.txt @@ -1,6 +1,8 @@ // container-tools - Manage systemd-nspawn containers // Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> // +// SPDX-License-Identifier: GPL-3.0+ +// // 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 diff --git a/share/man/container.1.txt b/share/man/container.1.txt index 864e53f..5029d25 100644 --- a/share/man/container.1.txt +++ b/share/man/container.1.txt @@ -1,6 +1,8 @@ // container-tools - Manage systemd-nspawn containers // Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> // +// SPDX-License-Identifier: GPL-3.0+ +// // 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 diff --git a/share/scripts/curl b/share/scripts/curl index 709e59c..1353bce 100755 --- a/share/scripts/curl +++ b/share/scripts/curl @@ -3,6 +3,8 @@ # container-tools - Manage systemd-nspawn containers # Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> # +# SPDX-License-Identifier: GPL-3.0+ +# # 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 diff --git a/share/scripts/curl.d/0001-debconf b/share/scripts/curl.d/0001-debconf index 184a5ed..598c482 100755 --- a/share/scripts/curl.d/0001-debconf +++ b/share/scripts/curl.d/0001-debconf @@ -3,6 +3,8 @@ # container-tools - Manage systemd-nspawn containers # Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> # +# SPDX-License-Identifier: GPL-3.0+ +# # 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 diff --git a/share/scripts/debconf b/share/scripts/debconf index 3bc3b43..ee23ebc 100755 --- a/share/scripts/debconf +++ b/share/scripts/debconf @@ -3,6 +3,8 @@ # container-tools - Manage systemd-nspawn containers # Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> # +# SPDX-License-Identifier: GPL-3.0+ +# # 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 @@ -933,17 +935,6 @@ Commands () { DIRECTORY="${1}" - if [ -n "${HOST_COMMAND}" ] - then - echo "${HOST_COMMAND}" > "${DIRECTORY}/.host-command" - - cd "${DIRECTORY}" - sh "${DIRECTORY}/.host-command" - cd "${OLDPWD}" - - rm -f "${DIRECTORY}/.host-command" - fi - # config (FIXME) # maximum of 15 characters, prefix is 'veth-' @@ -985,6 +976,19 @@ Commands () # Setting root password echo root:${ROOT_PASSWORD} | chroot "${DIRECTORY}" chpasswd + # Host command + if [ -n "${HOST_COMMAND}" ] + then + echo "${HOST_COMMAND}" > "${DIRECTORY}/.host-command" + + cd "${DIRECTORY}" + sh "${DIRECTORY}/.host-command" + cd "${OLDPWD}" + + rm -f "${DIRECTORY}/.host-command" + fi + + # Show root password in case its automatically set case "${ROOT_RANDOM_PASSWORD}" in true) echo "${NAME}: root password set to '${ROOT_PASSWORD}'." diff --git a/share/scripts/debconf.d/0001-preseed-file b/share/scripts/debconf.d/0001-preseed-file index d3cc49d..5b646c4 100755 --- a/share/scripts/debconf.d/0001-preseed-file +++ b/share/scripts/debconf.d/0001-preseed-file @@ -3,6 +3,8 @@ # container-tools - Manage systemd-nspawn containers # Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> # +# SPDX-License-Identifier: GPL-3.0+ +# # 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 @@ -30,6 +32,17 @@ then # user specified one or more preseed files through commandline option db_set cnt-debconf/preseed-file "${PRESEED_FILE}" db_fset cnt-debconf/preseed-file seen true +elif [ -e "${CONFIG}/${NAME}.cfg" ] +then + # user did not specify a pressed file, but there is a matching one + # 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 [ -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 then # user has not specified preseed files through commandline option, diff --git a/share/scripts/debconf.d/0002-preseed-debconf b/share/scripts/debconf.d/0002-preseed-debconf index d46121c..3a96ad4 100755 --- a/share/scripts/debconf.d/0002-preseed-debconf +++ b/share/scripts/debconf.d/0002-preseed-debconf @@ -3,6 +3,8 @@ # container-tools - Manage systemd-nspawn containers # Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> # +# SPDX-License-Identifier: GPL-3.0+ +# # 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 diff --git a/share/scripts/debconf.d/0003-debconf b/share/scripts/debconf.d/0003-debconf index 1773b09..4395abc 100755 --- a/share/scripts/debconf.d/0003-debconf +++ b/share/scripts/debconf.d/0003-debconf @@ -3,6 +3,8 @@ # container-tools - Manage systemd-nspawn containers # Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> # +# SPDX-License-Identifier: GPL-3.0+ +# # 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 diff --git a/share/scripts/debootstrap b/share/scripts/debootstrap index 0c19d54..e34613c 100755 --- a/share/scripts/debootstrap +++ b/share/scripts/debootstrap @@ -3,6 +3,8 @@ # container-tools - Manage systemd-nspawn containers # Copyright (C) 2014-2017 Daniel Baumann <daniel.baumann@open-infrastructure.net> # +# SPDX-License-Identifier: GPL-3.0+ +# # 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 |