summaryrefslogtreecommitdiffstats
path: root/share/scripts/debconf
diff options
context:
space:
mode:
Diffstat (limited to 'share/scripts/debconf')
-rwxr-xr-xshare/scripts/debconf26
1 files changed, 15 insertions, 11 deletions
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}'."