summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-11-07 15:31:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-11-07 15:35:59 +0000
commit159288cd7ba4c0d3e24c89857efcc0a56d716fa7 (patch)
treee502766dd456f3c25915e957f962c6cc2ed1ef0b
parentReleasing debian version 20211103-1. (diff)
downloadopen-infrastructure-compute-tools-159288cd7ba4c0d3e24c89857efcc0a56d716fa7.tar.xz
open-infrastructure-compute-tools-159288cd7ba4c0d3e24c89857efcc0a56d716fa7.zip
Adding upgrade-handling for logfiles from buster to bullseye and newer.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rwxr-xr-xdebian/open-infrastructure-container-tools.postinst12
1 files changed, 12 insertions, 0 deletions
diff --git a/debian/open-infrastructure-container-tools.postinst b/debian/open-infrastructure-container-tools.postinst
index 39dd01b..ee13b73 100755
--- a/debian/open-infrastructure-container-tools.postinst
+++ b/debian/open-infrastructure-container-tools.postinst
@@ -102,6 +102,18 @@ case "${1}" in
rmdir -p /etc/open-infrastructure/container > /dev/null 2>&1 || true
fi
+ # upgrade from buster: logfiles
+ if ls /var/log/open-infrastructure/container.log* > /dev/null 2>&1
+ then
+ if [ -e /var/log/compute-tools ]
+ then
+ mv /var/log/open-infrastructure/* /var/log/compute-tools 2>&1 || true
+ rmdir /var/log/open-infrastructure > /dev/null 2>&1 || true
+ else
+ mv /var/log/open-infrastructure /var/log/compute-tools
+ fi
+ fi
+
if [ ! -e "${CONFFILE}" ]
then