summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-11-02 14:48:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-11-02 17:11:53 +0000
commit92d8c7e585e33c4611f59d087d00e4d2433f0dc4 (patch)
tree73d505d4ac235512f94a388c9cb5311ced101703
parentReplacing which with command in maintainer scripts. (diff)
downloadopen-infrastructure-compute-tools-92d8c7e585e33c4611f59d087d00e4d2433f0dc4.tar.xz
open-infrastructure-compute-tools-92d8c7e585e33c4611f59d087d00e4d2433f0dc4.zip
Adding upgrade-handling buster to bullseye and newer.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rwxr-xr-xdebian/open-infrastructure-container-tools.postinst16
1 files changed, 16 insertions, 0 deletions
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