summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2018-01-19 05:47:51 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2018-01-19 05:47:51 +0000
commit578e3adf3d7a213cb5aa0c9833d6999f43d3bad5 (patch)
treeb2275b632fdc3b87559c57962a001bb3bff76157 /share
parentAdding note about vsyscall boot parameter in host-setup documentation. (diff)
downloadcompute-tools-578e3adf3d7a213cb5aa0c9833d6999f43d3bad5.tar.xz
compute-tools-578e3adf3d7a213cb5aa0c9833d6999f43d3bad5.zip
Running host commands as last thing in debconf container create script in order to make it possible to change config files dynamically.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to '')
-rwxr-xr-xshare/scripts/debconf24
1 files changed, 13 insertions, 11 deletions
diff --git a/share/scripts/debconf b/share/scripts/debconf
index dd426cd..ee23ebc 100755
--- a/share/scripts/debconf
+++ b/share/scripts/debconf
@@ -935,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-'
@@ -987,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}'."