summaryrefslogtreecommitdiffstats
path: root/share/scripts/debconf.d
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2018-01-19 09:53:32 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2018-01-19 09:53:46 +0000
commit148ade883d98e7f72f2a3fd01862922d4b49f90c (patch)
tree430798cc2fb16b875ee4f51e118d2f365e21797f /share/scripts/debconf.d
parentReleasing debian version 20171101-1. (diff)
downloadopen-infrastructure-compute-tools-148ade883d98e7f72f2a3fd01862922d4b49f90c.tar.xz
open-infrastructure-compute-tools-148ade883d98e7f72f2a3fd01862922d4b49f90c.zip
Merging upstream version 20180118.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'share/scripts/debconf.d')
-rwxr-xr-xshare/scripts/debconf.d/0001-preseed-file13
-rwxr-xr-xshare/scripts/debconf.d/0002-preseed-debconf2
-rwxr-xr-xshare/scripts/debconf.d/0003-debconf2
3 files changed, 17 insertions, 0 deletions
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