summaryrefslogtreecommitdiffstats
path: root/share/scripts/debconf
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@open-infrastructure.net>2021-04-11 14:31:06 +0000
committerDaniel Baumann <daniel.baumann@open-infrastructure.net>2021-04-11 14:31:06 +0000
commit8a070c82737b23b18f6c83b4d5d5a8422701fa8b (patch)
treefb482db5195bc20d6c676e49c6c4461f2c0db720 /share/scripts/debconf
parentReleasing version 20210411. (diff)
downloadcompute-tools-8a070c82737b23b18f6c83b4d5d5a8422701fa8b.tar.xz
compute-tools-8a070c82737b23b18f6c83b4d5d5a8422701fa8b.zip
Using dpkg selection to check package availability in debconf container create script, rather than to rely on dpkg internal files.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to '')
-rwxr-xr-xshare/scripts/debconf4
1 files changed, 2 insertions, 2 deletions
diff --git a/share/scripts/debconf b/share/scripts/debconf
index 1994926..28c5262 100755
--- a/share/scripts/debconf
+++ b/share/scripts/debconf
@@ -607,7 +607,7 @@ EOF
do
if grep -qs locales "${FILE}"
then
- if [ -e "${DIRECTORY}/var/lib/dpkg/info/locales.list" ]
+ if Chroot "${DIRECTORY}" dpkg --get-selections | awk '{ print $1 }' | grep -qs '^locales$'
then
rm -f "${DIRECTORY}/etc/default/locale" "${DIRECTORY}/etc/locale.gen"
Chroot "${DIRECTORY}" "DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=criticial dpkg-reconfigure locales"
@@ -650,7 +650,7 @@ EOF
fi
# Manual hack to regenerate ssh keys
- if [ -e "${DIRECTORY}/var/lib/dpkg/info/openssh-server.postinst" ] && \
+ if Chroot "${DIRECTORY}" dpkg --get-selections | awk '{ print $1 }' | grep -qs '^openssh-server$' && \
! ls "${DIRECTORY}"/etc/ssh/ssh_host_*_key > /dev/null 2>&1
then
Chroot "${DIRECTORY}" "DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=criticial dpkg-reconfigure openssh-server"