diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2018-01-19 09:53:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2018-01-19 09:53:27 +0000 |
commit | 856b8e136a903883ed36c790ef715ffd35eff3f7 (patch) | |
tree | fadc80711552ec1fe0d68f28da870551fe89462a /share/scripts | |
parent | Adding upstream version 20171101. (diff) | |
download | open-infrastructure-compute-tools-856b8e136a903883ed36c790ef715ffd35eff3f7.tar.xz open-infrastructure-compute-tools-856b8e136a903883ed36c790ef715ffd35eff3f7.zip |
Adding upstream version 20180118.upstream/20180118
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'share/scripts')
-rwxr-xr-x | share/scripts/curl | 2 | ||||
-rwxr-xr-x | share/scripts/curl.d/0001-debconf | 2 | ||||
-rwxr-xr-x | share/scripts/debconf | 26 | ||||
-rwxr-xr-x | share/scripts/debconf.d/0001-preseed-file | 13 | ||||
-rwxr-xr-x | share/scripts/debconf.d/0002-preseed-debconf | 2 | ||||
-rwxr-xr-x | share/scripts/debconf.d/0003-debconf | 2 | ||||
-rwxr-xr-x | share/scripts/debootstrap | 2 |
7 files changed, 38 insertions, 11 deletions
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 |