From 92d8c7e585e33c4611f59d087d00e4d2433f0dc4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 2 Nov 2021 15:48:27 +0100 Subject: Adding upgrade-handling buster to bullseye and newer. Signed-off-by: Daniel Baumann --- debian/open-infrastructure-container-tools.postinst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/debian/open-infrastructure-container-tools.postinst b/debian/open-infrastructure-container-tools.postinst index 9f0b42e..39dd01b 100755 --- a/debian/open-infrastructure-container-tools.postinst +++ b/debian/open-infrastructure-container-tools.postinst @@ -86,6 +86,22 @@ case "${1}" in update-alternatives --quiet --set container_build-script "/usr/share/compute-tools/build-scripts/${SCRIPT}" + # upgrade from buster: conffile + if [ -e /etc/open-infrastructure/container.conf ] && [ ! -e "${CONFFILE}" ] + then + mv /etc/open-infrastructure/container.conf "${CONFFILE}" + rmdir /etc/open-infrastructure > /dev/null 2>&1 || true + fi + + # upgrade from buster: keys + if [ -e /etc/open-infrastructure/container/keys ] + then + mv /etc/open-infrastructure/container/keys/* "${KEYS}" > /dev/null 2>&1 || true + rmdir /etc/open-infrastructure/container/keys > /dev/null 2>&1 || true + rm -f /etc/open-infrastructure/container/keys > /dev/null 2>&1 || true + rmdir -p /etc/open-infrastructure/container > /dev/null 2>&1 || true + fi + if [ ! -e "${CONFFILE}" ] then -- cgit v1.2.3